This the backend server for the Lambda School book-r build week project.
https://lambda-bookr.herokuapp.com/api/
To run the server locally, first install dependencies
yarn installTo run the server for use in another application
yarn frontendThis will reset the development database and fill it with seed data, as well as launch the server on port 3500. Note that this will discard any existing data.
To set the server to a different port, set the environment variable ENV to
the desired number. This can be done using your operating systems method of
choice, or by using a .env file in the project’s root.
For development, the staging postgres database needs to be configured. It’s
connection is supplied via the DATABASE_URL environment variable. To migrate
and seed the database
npx knex migrate:latest --env staging && npx knex seed:run --env stagingTo run the server
yarn serverTests may also be ran via
yarn test-stagingNote that this will rollback and reapply migrations, as well as reseed the database.