Skip to content

UmarNawaz33/wiki-restful-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Built With

This application is built with the following:

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 for more information.

Acknowledgements

Releases

No releases published

Packages

No packages published