Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Hayato-Shiki committed Apr 24, 2024
0 parents commit 3d52071
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM node:20.12.2-slim

RUN apt-get update && \
apt-get install -y locales git procps
RUN locale-gen ja_JP.UTF-8
RUN localedef -f UTF-8 -i ja_JP ja_JP
ENV LANG=ja_JP.UTF-8
ENV TZ=Asia/Tokyo
WORKDIR /nodejs-study
7 changes: 7 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
'use strict';
const number = process.argv[2] || 0;
let sum = 0;
for (let i = 1; i <= number; i++) {
sum = sum + i;
}
console.log(sum);
6 changes: 6 additions & 0 deletions compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
services:
app:
build: .
tty: true
volumes:
- .:/nodejs-study

0 comments on commit 3d52071

Please sign in to comment.