File tree Expand file tree Collapse file tree 4 files changed +40
-0
lines changed Expand file tree Collapse file tree 4 files changed +40
-0
lines changed Original file line number Diff line number Diff line change
1
+ node_modules
2
+ npm-debug.log
Original file line number Diff line number Diff line change
1
+ FROM node:8
2
+
3
+ WORKDIR /usr/src/app
4
+
5
+ COPY package*.json ./
6
+ RUN npm ci --only=production
7
+
8
+ COPY . .
9
+
10
+ EXPOSE 8080
11
+ CMD [ "npm" , "start" ]
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " my_app" ,
3
+ "version" : " 1.0.0" ,
4
+ "description" : " Sample used for container templates" ,
5
+ "author" : " Shashank Barsin" ,
6
+ "main" : " server.js" ,
7
+ "scripts" : {
8
+ "start" : " node server.js"
9
+ },
10
+ "dependencies" : {
11
+ "express" : " ^4.16.4"
12
+ }
13
+ }
Original file line number Diff line number Diff line change
1
+ 'use strict' ;
2
+
3
+ const express = require ( 'express' ) ;
4
+
5
+ const PORT = 8080 ;
6
+ const HOST = '0.0.0.0' ;
7
+
8
+ const app = express ( ) ;
9
+ app . get ( '/' , ( req , res ) => {
10
+ res . send ( 'Hello world\n' ) ;
11
+ } ) ;
12
+
13
+ app . listen ( PORT , HOST ) ;
14
+ console . log ( `Running on http://${ HOST } :${ PORT } ` ) ;
You can’t perform that action at this time.
0 commit comments