Skip to content
This repository has been archived by the owner on Jul 17, 2022. It is now read-only.

mazipan/nodejs-simple-contact-webapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nodejs-simple-contact-webapp

Created with Love for this : https://www.codepolitan.com/problemset-nodejs-dasar

Preview

Using technology

- Expressjs, Mongoose and JWT for API development - Swagger and Swagger UI for documentation - AngularJS for UI

Installation

- Install depedency https://github.com/swagger-api/swagger-node
npm install -g swagger
- Install all depedency
npm install
- Run mongodb
mongod
- Run the server
swagger project start
OR
npm start
- Open in browser
http://localhost:10010
- Open API documentation in browser
http://localhost:10010/docs/#/default

API Usage Notes

- all API that related with ADD, UPDATE, DELETE must have token - to get token you must have user - to create user --> use API POST /api/authenticate/addnew - to get token --> use API POST /api/authenticate - then you can copy and paste token in parameter API like ADD, UPDATE, DELETE

Folder Structure

- all code in api folder - api/connection/connection.js is mongodb connection - app.js is main server js - folder api/controllers is all api routing - folder api/models is schema model for mongodb ORM - folder api/swagger is configuration for swagger UI

Hope will usefull for you all.

Contact Me :

Email Website Facebook

Twitter Linkedin Slideshare