Browse Source

removed convoluted script and replaced with a simple one

master
kj1352 4 years ago
parent
commit
1b33d1978a
4 changed files with 3 additions and 8 deletions
  1. BIN
      .gitignore
  2. +1
    -6
      package.json
  3. +1
    -1
      src/db-utils.ts
  4. +1
    -1
      src/index.ts

BIN
.gitignore View File


+ 1
- 6
package.json View File

@@ -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
- 1
src/db-utils.ts View File

@@ -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;




+ 1
- 1
src/index.ts View File

@@ -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'), () => {


Loading…
Cancel
Save