We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
0 parents commit 5e71c7bCopy full SHA for 5e71c7b
Docker-compose.yml
@@ -0,0 +1,7 @@
1
+version: '3'
2
+services:
3
+ app:
4
+ build: .
5
+ tty: true
6
+ volumes:
7
+ - .:/nodejs-study
Dockerfile
@@ -0,0 +1,9 @@
+FROM --platform=linux/x86_64 node:14.15.4
+
+RUN apt-get update
+RUN apt-get install -y locales
+RUN locale-gen ja_JP.UTF-8
+RUN localedef -f UTF-8 -i ja_JP ja_JP
+ENV LANG ja_JP.UTF-8
8
+ENV TZ Asia/Tokyo
9
+WORKDIR /nodejs-study
app.js
+'use strict';
+const number = process.argv[2] || 0;
+let sum = 0;
+for (let i = 1; i <= number; i++) {
+ sum = sum + i;
+}
+console.log(sum);
0 commit comments