An awesome project with meteors. Create meteors to be added to a watchlist
https://robotgyal.github.io/meteor-watchlist-node-api/#/
This API allows users to create their own meteors! This allows for later viewing, editing, and deleting.
The data at watchlist/all is from the NASA datset
-
Through Postman (Preferred Method)
- First make sure to download Postman
- Clone this repository locally
- Run your virtual environment on the folder (not required)
- Run
npm install -all
to get all node dependencies - Run
pip3 install -r requirements.txt
to get all python dependencies - Run
nodemon server.js
to launch the server. This is required to be able to test the routes through Postman - Type in first route
localhost:8000/
- To get access go to the next route
localhost:8000/auth
as a POST request- This will generate a token that needs to be used to gain access to the other routes (save this token!)
- With the token saved, revisit the route
localhost:8000/
- In postman, click the headers tab
- Enter as the key
auth
and as the value thebearer GENERATED_TOKEN
. 'bearer' must be in the value, followed by a space, followed by the token
- This will generate a token that needs to be used to gain access to the other routes (save this token!)
- This unlocks all routes!
-
Live Link
- There is a live live available. It is hosted through Heroku however as this API only consists of backend rputing, the live link does not have content displayed.
When attempting to access any route without authentication, expect a Status: 403
error. To resolve, go to the auth
route to acquire token for use in authentication.
POST
http://localhost:8000/auth
Main watchlist route to show whats in watchlist
The following are locked without authentication
GET
http://localhost:800/
show homepage
GET
http://localhost:8000/watchlist
Main watchlist route to show whats in watchlist
GET
http://localhost:8000/watchlist/:id
View one meteor on watchlist
DELETE
http://localhost:8000/watchlist/delete/:id
Delete meteor from watchlist
PATCH
http://localhost:8000/watchlist/edit/:id
Update meteor from watchlist
POST
http://localhost:8000/watchlist/add
Add meteor to watchlist
GET
http://localhost:8000/watchlist/all
View all meteorites in the dataset as json