This is the API for Simplefol.io. If you'd like to learn more about the site, check out the front end repo.
Built with Node/Express/Mongo/Mongoose.
Right now the API is not open to outside requests, but it contains the following end points (all within the
/- create user account (
/login- login (
/refresh- refresh authToken
/- return user account info (portfolio and watchlist)
/portfolio- edit user portfolio
/watchlist- edit user watchlist
Usage & Installation
After making a local clone of this repo, run
npm install and then
npm start to get the server running. You'll need to run MongoDB locally, and there are two environmental variables that you'll need to add to a
.env file. The first is the
JWT_SECRET which can be any string that you'd like. And the second optional variable is
TEST_DATABASE_URL if you'd like the tests to be executed somewhere other than your local database. You can see all config variables in the
config.js file in the root directory.
If you're just adding the
JWT_SECRET, you'll create a file called
.env in the root directory and in it put something like this