File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11const express = require ( 'express' ) ;
22const path = require ( 'path' ) ;
3+ const cors = require ( 'cors' ) ;
34
45const app = express ( ) ;
56const PORT = process . env . PORT || 3000 ;
67
8+ app . use ( cors ( ) ) ;
79app . use ( express . json ( ) ) ;
810app . use ( express . static ( path . join ( __dirname , '../frontend' ) ) ) ;
911
Original file line number Diff line number Diff line change 1+ FROM nginx:1.27-alpine
2+
3+ COPY index.html /usr/share/nginx/html/index.html
4+ COPY style.css /usr/share/nginx/html/style.css
5+ COPY app.js /usr/share/nginx/html/app.js
6+
7+ EXPOSE 80
8+
9+ CMD ["nginx" , "-g" , "daemon off;" ]
Original file line number Diff line number Diff line change 55 "main" : " app.js" ,
66 "keywords" : [" chat" , " frontend" ],
77 "author" : " " ,
8+ "license" : " UNLICENSED" ,
9+ "private" : true ,
810 "dependencies" : {}
9-
10- "scripts" : {
11- "start" : " node server.js" ,
12- "dev" : " node --watch server.js"
13- },
14- "dependencies" : {
15- "cors" : " ^2.8.5" ,
16- "express" : " ^4.21.2"
17- }
1811}
You can’t perform that action at this time.
0 commit comments