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.
To use this example, you need to clone this repository
git clone https://github.com/n-els/express-sql.gitInstall all dependencies from the package.json with npm
npm iCustomize 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 startTo permanently "watch" your server (powered by nodemon), you should instead run
npm run dev