https://github.com/kirankumar-matham96/addressbook_nodejs_backend
https://github.com/kirankumar-matham96/addressbook_nodejs_backend
Last synced: 13 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/kirankumar-matham96/addressbook_nodejs_backend
- Owner: kirankumar-Matham96
- Created: 2021-06-17T15:53:41.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-07-30T14:44:11.000Z (almost 4 years ago)
- Last Synced: 2025-03-29T08:29:50.835Z (3 months ago)
- Language: JavaScript
- Size: 11.5 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Addressbook_nodeJS_backend
-> This backend application is used to perform CRUD operations at server side.
-> Implemented using NodeJS-ExpressJS-MongoDB.
-> Have the features of validating user input,
encrypts the passwordand generates JWT for the security and
authenticate user and autherize before accessing database.---
## RequirementsFor development, you will need Visual Studio Code(VSCODE), Node.js and a node global package, npm,
installed in your environement.
Also need:
-> ExpressJS: to build the API and utilise HTTP methods.
-> MongooseJS: to connect to the database and build schema.
-> winston: to log the data to files/database.
-> @hapi/joi: to validate the user input.
-> bcrypt: to encrypt the password.
-> jsonwebtoken: to parse the information seccurely without violating the data.
-> dotenv: to avoid including sensitive data to the project.
-> nodemon: to restart the server when ever the chages happen in the program.
If you want to perform tests:
-> mocha: test runner. (you can choose any other test runner.)
-> chai: library for the assertion methods.
-> istambul/nyc: for code coverage.
Incase, if npm cache propblems occurs:
-> ws: to solve some of the cache problems.(If not solved, please remove and re-install all the node modules.)### Node
- #### Node installation on WindowsJust go on [official Node.js website](https://nodejs.org/) and download the installer.
Also, be sure to have `git` available in your PATH, `npm` might need it (You can find git [here](https://git-scm.com/)).- #### Node installation on Ubuntu
You can install nodejs and npm easily with apt install, just run the following commands.
$ sudo apt install nodejs
$ sudo apt install npm- #### Other Operating Systems
You can find more information about the installation on the [official Node.js website](https://nodejs.org/) and the [official NPM website](https://npmjs.org/).If the installation was successful, you should be able to run the following command.
$ node --version
v8.11.3$ npm --version
6.1.0If you need to update `npm`, you can make it using `npm`! Cool right? After running the following command, just open again the command line and be happy.
$ npm install npm -g
###
## Configure appOpen `a/nice/path/to/a.file` then edit it with your settings. You will need:
- URL for the mongodb;
- Port number to run the server;
- Secret code for JWT;## Running the project
$ npm start
## To run the test cases$ npm test