Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/umarnawaz33/wiki-restful-api
This is a simple restful api for articles.
https://github.com/umarnawaz33/wiki-restful-api
expressjs mongodb mongoose nodejs restful-api
Last synced: about 1 month ago
JSON representation
This is a simple restful api for articles.
- Host: GitHub
- URL: https://github.com/umarnawaz33/wiki-restful-api
- Owner: UmarNawaz33
- License: mit
- Created: 2021-10-02T09:27:52.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-10-03T18:36:07.000Z (over 3 years ago)
- Last Synced: 2024-11-25T00:27:13.393Z (about 2 months ago)
- Topics: expressjs, mongodb, mongoose, nodejs, restful-api
- Language: JavaScript
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## About The Project
This is a simple restful api for articles. This restful api allows you to perform the CRUD operations on a database of articles.## Getting Started
To run this project first you need to setup your enviroment for nodejs. After that you need to:
* Clone this project.
* Use `npm install` command to install all the packages.#### To Run Locally
* Setup and Configure mongb locally.
* Use `mongod` command to start mongodb server using terminal.
* Use `node app.js` command to start the node server on localhost.#### To Run on Server
* Setup and Configure mongodb atlas for your project.
* Setup and Configure server(heroku) for your app.
* Update `.env` file accordingly.
* For Deployment, follow the guidelines provided by heroku or any other server you are using.#### Testing
For testing the api you can use [Postman](https://www.postman.com/).
### Built With
This application is built with the following:
* [Node JS](https://nodejs.org/en/)
* [Express JS](https://expressjs.com/)
* [MongoDb](https://www.mongodb.com/)## API Endpoints
This api allows all CRUD operations and it has following endpoints:Reuest Path Body Parameters Request Parameters Explanation
GET http://localhost:3000/articles - - to get all articles
POST http://localhost:3000/articles title, content - add article in database
DELETE http://localhost:3000/articles - - delete all articles
GET http://localhost:3000/articles/:articleTitle - articleTitle get article with specific title
PUT http://localhost:3000/articles/:articleTitle title, content articleTitle update article with specified title
DELETE http://localhost:3000/articles/:articleTitle - articleTitle delete article with specified title## License
Distributed under the MIT License. See [LICENSE](https://github.com/UmarNawaz33/wiki-restful-api/blob/main/LICENSE) for more information.
## Acknowledgements
* [body-parser](https://www.npmjs.com/package/body-parser)
* [express](https://www.npmjs.com/package/express)
* [mongoose](https://www.npmjs.com/package/mongoose)