This is a NewsPortal Backend application for NewsPortal Mobile App. Built with NodeJs using the ExpressJs Framework. Express.js is a web application framework for Node.js. More about Express
- Open app's directory in CMD or Terminal
- Type
npm install
- Turn on Web Server and MySQL can using Third-party tool like xampp, etc.
- Type
sequelize db:migrate
in CMD or Terminal - Open Postman desktop application or Chrome web app extension that has installed before
- Choose HTTP Method and enter request url.(ex. localhost:8080/)
- You can see all the end point here
1. GET
-
/private/news/user
(Get all news/article from user login) -
/private/news/user/:idNews
(Get news/article from user login with specific id) -
/private/news
(Get all news/article) -
/private/news/:id
(Get news/article detail) -
/private/users
(Get detail user login) -
/users
(Get all users)
2. POST
-
/auth/register
(Create account) -
/auth/login
(Login for user) -
/private/news
(Create news/article)
3. PATCH
-
/private/news/:idNews
(Update news) -
/private/users
(Update user's profile) -
/private/users/change-password
(Update user's password)
4. DELETE
-
/private/news/:idNews
(Delete news by id) -
/private/users
(Delete account)