File tree Expand file tree Collapse file tree 5 files changed +4816
-0
lines changed Expand file tree Collapse file tree 5 files changed +4816
-0
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "name" : " chat-app-backend" ,
3+ "version" : " 1.0.0" ,
4+ "description" : " " ,
5+ "main" : " src/index.js" ,
6+ "scripts" : {
7+ "dev" : " nodemon src/index.js" ,
8+ "start" : " node src/index.js" ,
9+ "test" : " jest"
10+ },
11+ "repository" : {
12+ "type" : " git" ,
13+ "url" : " git+https://github.com/MatheusIshiyama/chat-app-backend.git"
14+ },
15+ "keywords" : [],
16+ "author" : " " ,
17+ "license" : " ISC" ,
18+ "bugs" : {
19+ "url" : " https://github.com/MatheusIshiyama/chat-app-backend/issues"
20+ },
21+ "homepage" : " https://github.com/MatheusIshiyama/chat-app-backend#readme" ,
22+ "dependencies" : {
23+ "dotenv" : " ^8.2.0" ,
24+ "express" : " ^4.17.1" ,
25+ "mongoose" : " ^5.12.3"
26+ },
27+ "devDependencies" : {
28+ "jest" : " ^26.6.3" ,
29+ "nodemon" : " ^2.0.7" ,
30+ "supertest" : " ^6.1.3"
31+ }
32+ }
Original file line number Diff line number Diff line change 1+ const express = require ( "express" ) ;
2+
3+ //* express setup
4+ const app = express ( ) ;
5+ app . use ( express . json ( ) ) ;
6+ app . use ( express . urlencoded ( { extended : true } ) ) ;
7+
8+ //* routes
9+ app . use ( "/user" , require ( "./routes/user" ) ) ;
10+
11+ module . exports = app ;
Original file line number Diff line number Diff line change 1+ const app = require ( './app' ) ;
2+ require ( 'dotenv' ) . config ( ) ;
3+
4+ app . listen ( process . env . PORT , ( ) => console . log ( '[SERVER] Running' ) )
Original file line number Diff line number Diff line change 1+ const express = require ( "express" ) ;
2+ const userRoutes = express . Router ( ) ;
3+
4+ userRoutes . get ( '/' , ( req , res ) => {
5+ res . sendStatus ( 200 ) ;
6+ } )
7+
8+ module . exports = userRoutes ;
You can’t perform that action at this time.
0 commit comments