| @@ -4,12 +4,7 @@ | |||||
| "description": "job portal backend node app", | "description": "job portal backend node app", | ||||
| "main": "dist/index.js", | "main": "dist/index.js", | ||||
| "scripts": { | "scripts": { | ||||
| "prebuild": "tslint -c tslint.json -p tsconfig.json --fix", | |||||
| "build": "tsc", | |||||
| "prestart": "npm run build", | |||||
| "start": "node .", | |||||
| "watch": "nodemon src/index.ts & tslint -c tslint.json -p tsconfig.json --fix & npm run build & node .", | |||||
| "test": "echo \"Error: no test specified\" && exit 1" | |||||
| "start": "nodemon src/index.ts && tsc && node dist/src/index.js" | |||||
| }, | }, | ||||
| "author": "", | "author": "", | ||||
| "license": "ISC", | "license": "ISC", | ||||
| @@ -1,6 +1,6 @@ | |||||
| import { MongoClient, Collection } from 'mongodb'; | import { MongoClient, Collection } from 'mongodb'; | ||||
| // You can define any db name you are looking for here | |||||
| export const DB_NAME = 'jobportal'; | export const DB_NAME = 'jobportal'; | ||||
| const DATABASE_URL = 'mongodb://localhost:27017/' + DB_NAME; | const DATABASE_URL = 'mongodb://localhost:27017/' + DB_NAME; | ||||
| @@ -19,7 +19,7 @@ app.use('/', authRoutes); | |||||
| app.use('/', userProfileRoutes); | app.use('/', userProfileRoutes); | ||||
| app.get('/', (request, response) => { | app.get('/', (request, response) => { | ||||
| response.send('Server running' + app.get('port')); | |||||
| response.send('Server running @ port' + app.get('port')); | |||||
| }); | }); | ||||
| const server = app.listen(app.get('port'), () => { | const server = app.listen(app.get('port'), () => { | ||||