8000 GitHub - Blevs/webdb-postgres
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Blevs/webdb-postgres

Repository files navigation

book-r Backend

This the backend server for the Lambda School book-r build week project.

API Documentation

https://lambda-bookr.herokuapp.com/api/

Local Development

To run the server locally, first install dependencies

yarn install

To run the server for use in another application

yarn frontend

This 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 staging

To run the server

yarn server

Tests may also be ran via

yarn test-staging

Note that this will rollback and reapply migrations, as well as reseed the database.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0