/postgres-CRUD

Primary LanguageJavaScriptMIT LicenseMIT

CRUD Backend with Postgres setup

Includes Basic CRUD Methods for an example API

Simple Web API using Node.js and Express

You'll need

Project Setup

  • fork this repo
  • CD into its root directory where you cloned the repo
  • enter npm i to download dependencies
  • enter npm run server to start the server
  • running locally on port 4000
  • create .env file and create a variable named DATABASE_URL= and give it the value of a postgress database
  • connection line example: DATABASE_URL=postgres://username:password@localHost:5434/databaseName
  • create knex migrations for your data. the knexfile.js file has the configurations for the data directories that will be created for the schemas and the seeds, as per knex documentation
  • you can create schemas that would conform to the API endpoints already craeted, or build completely new schemas and endpoints. The code can be gutted completely, it's just a template 😄

Endpoints included:

Documentation published via Postman