https://github.com/lintangwisesa/express-mongodb-authentication
A simple authentication app using Express & MongoDB
https://github.com/lintangwisesa/express-mongodb-authentication
authentication expressjs mongodb mongoose
Last synced: 2 months ago
JSON representation
A simple authentication app using Express & MongoDB
- Host: GitHub
- URL: https://github.com/lintangwisesa/express-mongodb-authentication
- Owner: LintangWisesa
- Created: 2018-07-17T06:53:31.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-11-07T17:16:59.000Z (over 4 years ago)
- Last Synced: 2025-04-04T10:38:05.467Z (3 months ago)
- Topics: authentication, expressjs, mongodb, mongoose
- Language: JavaScript
- Size: 588 KB
- Stars: 15
- Watchers: 1
- Forks: 7
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

# A Simple Authentication App Using Express & MongoDB

#### 1. Activate your MongoDB server, then create a database, database user & collection on MongoDB:
```shell
$ use signin$ db.createUser({user: 'lintang', pwd: '1234', roles: ['readWrite', 'dbAdmin']})
$ db.createCollection('users')
```#### 2. Clone the project from my repo:
```shell
$ git clone https://github.com/LintangWisesa/Express-MongoDB-Authentication.git
```#### 3. Go to the repo then install all packages needed:
```shell
$ cd Express-MongoDB-Authentication$ npm install
```#### 4. Edit Express app route on _routes/router.js_! Make sure there is no error on your app by running _app.js_. Server will be running by default on localhost:3210!
```shell
$ node app
```#### 5. Open *localhost:3210* via browser. If everything goes well, the response will be similar to the picture below:
#### 6. Try to signup, check on your database, then try to login. Have fun :sunglasses: !
#
#### Lintang Wisesa :love_letter: [email protected]_
[Facebook](https://www.facebook.com/lintangbagus) |
[Twitter](https://twitter.com/Lintang_Wisesa) |
[Google+](https://plus.google.com/u/0/+LintangWisesa1) |
[Youtube](https://www.youtube.com/user/lintangbagus) |
:octocat: [GitHub](https://github.com/LintangWisesa) |
[Hackster](https://www.hackster.io/lintangwisesa)