Skip to content

Commit 5e71c7b

Browse files
author
DESKTOP-ER332B2\nitta
committed
first commit
0 parents  commit 5e71c7b

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

Docker-compose.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: '3'
2+
services:
3+
app:
4+
build: .
5+
tty: true
6+
volumes:
7+
- .:/nodejs-study

Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FROM --platform=linux/x86_64 node:14.15.4
2+
3+
RUN apt-get update
4+
RUN apt-get install -y locales
5+
RUN locale-gen ja_JP.UTF-8
6+
RUN localedef -f UTF-8 -i ja_JP ja_JP
7+
ENV LANG ja_JP.UTF-8
8+
ENV TZ Asia/Tokyo
9+
WORKDIR /nodejs-study

app.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
'use strict';
2+
const number = process.argv[2] || 0;
3+
let sum = 0;
4+
for (let i = 1; i <= number; i++) {
5+
sum = sum + i;
6+
}
7+
console.log(sum);

0 commit comments

Comments
 (0)