Skip to content

add home route to redirect to "/employee" route as default #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion project/models/db.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
const mongoose = require('mongoose');
const employee = require('./employee.model');

mongoose.connect('mongodb://localhost:27017/EmployeeDB', { useNewUrlParser: true }, (err) => {
if (!err) { console.log('MongoDB Connection Succeeded.') }
else { console.log('Error in DB connection : ' + err) }
});

require('./employee.model');
// require('./employee.model');
2 changes: 1 addition & 1 deletion project/models/employee.model.js
Original file line number Diff line number Diff line change
@@ -22,4 +22,4 @@ employeeSchema.path('email').validate((val) => {
return emailRegex.test(val);
}, 'Invalid e-mail.');

mongoose.model('Employee', employeeSchema);
module.exports = mongoose.model('Employee', employeeSchema);
15 changes: 15 additions & 0 deletions project/node_modules/.bin/handlebars

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions project/node_modules/.bin/handlebars.cmd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions project/node_modules/.bin/handlebars.ps1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions project/node_modules/.bin/mime

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions project/node_modules/.bin/mime.cmd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions project/node_modules/.bin/mime.ps1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions project/node_modules/.bin/semver

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions project/node_modules/.bin/semver.cmd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions project/node_modules/.bin/semver.ps1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions project/node_modules/.bin/uglifyjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions project/node_modules/.bin/uglifyjs.cmd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions project/node_modules/.bin/uglifyjs.ps1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

224 changes: 224 additions & 0 deletions project/node_modules/accepts/HISTORY.md
23 changes: 23 additions & 0 deletions project/node_modules/accepts/LICENSE
143 changes: 143 additions & 0 deletions project/node_modules/accepts/README.md
238 changes: 238 additions & 0 deletions project/node_modules/accepts/index.js
88 changes: 88 additions & 0 deletions project/node_modules/accepts/package.json
21 changes: 21 additions & 0 deletions project/node_modules/array-flatten/LICENSE
43 changes: 43 additions & 0 deletions project/node_modules/array-flatten/README.md
64 changes: 64 additions & 0 deletions project/node_modules/array-flatten/array-flatten.js
67 changes: 67 additions & 0 deletions project/node_modules/array-flatten/package.json
70 changes: 70 additions & 0 deletions project/node_modules/asap/CHANGES.md
21 changes: 21 additions & 0 deletions project/node_modules/asap/LICENSE.md
237 changes: 237 additions & 0 deletions project/node_modules/asap/README.md
65 changes: 65 additions & 0 deletions project/node_modules/asap/asap.js
66 changes: 66 additions & 0 deletions project/node_modules/asap/browser-asap.js
223 changes: 223 additions & 0 deletions project/node_modules/asap/browser-raw.js
90 changes: 90 additions & 0 deletions project/node_modules/asap/package.json
101 changes: 101 additions & 0 deletions project/node_modules/asap/raw.js
269 changes: 269 additions & 0 deletions project/node_modules/async/CHANGELOG.md

Large diffs are not rendered by default.

19 changes: 19 additions & 0 deletions project/node_modules/async/LICENSE
56 changes: 56 additions & 0 deletions project/node_modules/async/README.md
50 changes: 50 additions & 0 deletions project/node_modules/async/all.js
42 changes: 42 additions & 0 deletions project/node_modules/async/allLimit.js
37 changes: 37 additions & 0 deletions project/node_modules/async/allSeries.js
52 changes: 52 additions & 0 deletions project/node_modules/async/any.js
43 changes: 43 additions & 0 deletions project/node_modules/async/anyLimit.js
38 changes: 38 additions & 0 deletions project/node_modules/async/anySeries.js
68 changes: 68 additions & 0 deletions project/node_modules/async/apply.js
51 changes: 51 additions & 0 deletions project/node_modules/async/applyEach.js
37 changes: 37 additions & 0 deletions project/node_modules/async/applyEachSeries.js
110 changes: 110 additions & 0 deletions project/node_modules/async/asyncify.js
289 changes: 289 additions & 0 deletions project/node_modules/async/auto.js
170 changes: 170 additions & 0 deletions project/node_modules/async/autoInject.js
17 changes: 17 additions & 0 deletions project/node_modules/async/bower.json
Loading