- GET /stories -> findAllStories
- GET /stories/story/:storyID -> findStoryByStoryID
- POST /stories/create -> createStory
- DELETE /stories/:storyId -> deleteStory
- PUT /stories/:storyId -> updateStory
- GET /stories/place/:placeID -> findStoryByPlaceID
- Download and install mongoDB from https://www.mongodb.com/
- (Not very sure if this is needed) MongoDB needs a directory to store data, typically located at the root. a. mkdir /data b. mkdir /data/db c. On mac OS you may need to run with sudo
- From command line use ‘mongod’ to start the server(for mac you may need ‘sudo mongod’)
- Mongod server listens to port 27017
- On command line, use ‘mongo’ to connect to database server.
- In the mongodb command line you can use ‘show dbs’ to print all the available databases. You should have a database called ‘admin’
• Access the readme from https://drive.google.com/drive/u/1/folders/1m4AmKM9RY42YPohglCSAWJLnXo9pYzdr. Run the python script by following the instructions on the readme.md from the above link.
• Run the ‘show dbs’ command and you should see the climateTree database available
- Install node from https://nodejs.org/
- Clone the repo with ‘git clone https://github.com/climatetree/stories-microservice.git’
- Navigate into the cloned folder. Install express with “npm install express –save” on the command line
- Run the command ‘npm start’ to run the application.
- Open a web browser, type the URL as “http://localhost:3000/stories”. If you get data returned to you, your local setup is good to go.