File tree Expand file tree Collapse file tree 3 files changed +20
-3
lines changed Expand file tree Collapse file tree 3 files changed +20
-3
lines changed Original file line number Diff line number Diff line change
1
+ web: node server.js
Original file line number Diff line number Diff line change 2
2
"name" : " coderplex-backend" ,
3
3
"version" : " 0.0.0" ,
4
4
"description" : " Backend for coderplex.org" ,
5
- "main" : " index .js" ,
5
+ "main" : " server .js" ,
6
6
"scripts" : {
7
- "test" : " echo \" Error: no test specified\" && exit 1"
7
+ "test" : " echo \" Error: no test specified\" && exit 1" ,
8
+ "start" : " node server.js"
8
9
},
9
10
"repository" : {
10
11
"type" : " git" ,
27
28
"body-parser" : " ^1.18.3" ,
28
29
"express" : " ^4.16.3" ,
29
30
"mongodb" : " ^3.1.0" ,
30
- "nodemon" : " ^1.17.5"
31
+ "nodemon" : " ^1.17.5" ,
32
+ "express-jwt" : " ^3.0.1" ,
33
+ "express-session" : " ^1.11.3" ,
34
+ "jsonwebtoken" : " ^5.0.2"
35
+
31
36
}
32
37
}
Original file line number Diff line number Diff line change
1
+ var express = require ( 'express' ) ;
2
+ var app = express ( ) ;
3
+
4
+
5
+
6
+ app . get ( '/' , function ( req , res ) {
7
+ res . send ( 'Welcome to coderplex' ) ;
8
+ } ) ;
9
+ app . listen ( 3000 , function ( ) {
10
+ console . log ( 'Example app listening on port 3000!' ) ;
11
+ } ) ;
You can’t perform that action at this time.
0 commit comments