All Projects → HugoDF → Express Postgres Starter

HugoDF / Express Postgres Starter

Licence: mit
A starter project for Node.js with Express and Postgres running on Docker Compose

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Express Postgres Starter

Express Starter
Express Starter
Stars: ✭ 14 (-86.92%)
Mutual labels:  postgresql, express
Aclify
🔒 Node Access Control Lists (ACL).
Stars: ✭ 49 (-54.21%)
Mutual labels:  postgresql, express
Docker Compose Nodejs Examples
Finally some real world examples on getting started with Docker Compose and Nodejs
Stars: ✭ 944 (+782.24%)
Mutual labels:  express, docker-compose
Nodock
Docker Compose for Node projects with Node, MySQL, Redis, MongoDB, NGINX, Apache2, Memcached, Certbot and RabbitMQ images
Stars: ✭ 734 (+585.98%)
Mutual labels:  postgresql, docker-compose
Open Bank Mark
A bank simulation application using mainly Clojure, which can be used to end-to-end test and show some graphs.
Stars: ✭ 81 (-24.3%)
Mutual labels:  postgresql, docker-compose
Fastapi Realworld Example App
Backend logic implementation for https://github.com/gothinkster/realworld with awesome FastAPI
Stars: ✭ 911 (+751.4%)
Mutual labels:  postgresql, docker-compose
Gympoint Api
Rest API of a gym management application - built with Express, Postgres, Redis, and Nodemailer.
Stars: ✭ 39 (-63.55%)
Mutual labels:  postgresql, express
Compose Postgres
Postgresql & pgadmin4 powered by compose
Stars: ✭ 477 (+345.79%)
Mutual labels:  postgresql, docker-compose
Fullstack Shopping Cart
MERN stack shopping cart, written in TypeScript
Stars: ✭ 82 (-23.36%)
Mutual labels:  express, docker-compose
Uranus
Hierarchical Memo & Task Web-App
Stars: ✭ 71 (-33.64%)
Mutual labels:  postgresql, docker-compose
Docker Handbook Projects
Project codes used in "The Docker Handbook"
Stars: ✭ 661 (+517.76%)
Mutual labels:  express, docker-compose
Splits Io
a speedrunning data store, analysis engine, and racing platform
Stars: ✭ 99 (-7.48%)
Mutual labels:  postgresql, docker-compose
Filterlists
🛡 The independent, comprehensive directory of filter and host lists for advertisements, trackers, malware, and annoyances.
Stars: ✭ 653 (+510.28%)
Mutual labels:  postgresql, docker-compose
Online Bling
Stars: ✭ 9 (-91.59%)
Mutual labels:  postgresql, express
Phpmyfaq
phpMyFAQ - Open Source FAQ web application for PHP and MySQL, PostgreSQL and other databases
Stars: ✭ 494 (+361.68%)
Mutual labels:  postgresql, docker-compose
Goeat Api
Rest API for a food delivery application - Built with Express, Postgres, Redis, MongoDB and Nodemailer
Stars: ✭ 36 (-66.36%)
Mutual labels:  postgresql, express
Enferno
A Python framework based on Flask microframework, with batteries included, and best practices in mind.
Stars: ✭ 385 (+259.81%)
Mutual labels:  postgresql, docker-compose
Django React Boilerplate
DIY Django + React Boilerplate for starting your SaaS
Stars: ✭ 385 (+259.81%)
Mutual labels:  postgresql, docker-compose
Kongpose
Kong and Konga (admin webapp) development setup on docker-compose
Stars: ✭ 52 (-51.4%)
Mutual labels:  postgresql, docker-compose
Python Microservice Fastapi
Learn to build your own microservice using Python and FastAPI
Stars: ✭ 96 (-10.28%)
Mutual labels:  postgresql, docker-compose

Express Postgres Starter

A starter project for Node.js with Express and Postgres

Setup

Pre-requisites:

  • Docker for Desktop

Run docker-compose up in the root of the project.

It will bring up Postgres and the Express application server in development mode.

It binds the application server to localhost:3000, this can be re-mapped this by changing the first 3000 in 3000:3000 of ./docker-compose.yaml).

Postgres is exposed on port 35432. The connection string is postgres://user:[email protected]:35432/db (username, password and database name are defined in ./docker-compose.yaml).

You can connect to Postgres using the psql client:

psql postgres://user:[email protected]:35432/db

The default Docker CMD is npm start, ./docker-compose.yaml overrides this to npm run dev which runs the application using nodemon (auto-restart on file change).

Express API setup

The Express API is located in ./src/api.

Applications routes for resources are defined in ./src/api/index.js.

Global concerns like security, cookie parsing, body parsing and request logging are handled in ./server.js.

This application loosely follows the Presentation Domain Data Layering:

  • Presentation is dealt with in the ./src/api folder
  • Domain is dealt with in the ./src/modules folder. It's currently non-existent since we've only got generic user and session resources.
  • Data is dealt with in the ./src/persistence folder

Database setup + management

npm run migrate up will run the migrations.

npm run migrate down will roll back the migrations.

npm run migrate:create <migration-name> will create a new migration file in ./src/migrations.

To run the migrations inside of docker-compose. Which will run a bash instance inside the app container.

docker-compose run app bash

Followed by:

npm run migrate up

Session/Authentication management

Session management is done through a custom sessions table, /api/session endpoints (see ./src/api/session.js) and leveraging client-sessions.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].