Skip to content

My basic way to connect a postgreSQL-Database with an API based on express.js

License

Notifications You must be signed in to change notification settings

n-els/express-sql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

express-sql

A simple RESTful API connected to a PostgreSQL database.

Based on node.js and express.js, coupled with the power of the postgreSQL client and a clean, lightweight and scalable folder structure.

Usage

To use this example, you need to clone this repository

git clone https://github.com/n-els/express-sql.git

Install all dependencies from the package.json with npm

npm i

Customize the connectionString (located in /db/index.js (You should use an .environment variable here!)

const  connectionString  =  process.env.DB_CONNECTION_STRING;

Now you should be able to start your server with

npm start

To permanently "watch" your server (powered by nodemon), you should instead run

npm run dev

About

My basic way to connect a postgreSQL-Database with an API based on express.js

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published