This app showcases a website built with NodeJS. The site has a set of articles, each article has a separate page, all data about the article is stored in the PostgreSQL database. Docker is used to deploy the application.
๐ Deployed on Render
.
โโโ .
โโโ controllers - contains handlers for http requests
โโโ helpers - some string, file and database helper functions
โโโ middlewares - contains functions that will execute before the handler is executed
โโโ models - contains entities for their creation or getting
โโโ nginx - nginx web server config or certificate will place here
โโโ preloads - every file in this folder will be executed before starting the server
โโโ public - contains static files for http response
โโโ scripts - some bash scripts
โโโ sql - database ".sql" files for querying
โโโ views - file for page rendering
- Clone this repository
git clone https://github.com/sergeyyarkov/node-docker-example.git .
- Configure enviroment variables in
docker-compose.yml
forpostgres
andnodejs
serivces if you need to - Build and run application with
docker-compose up --build
- Node.js >= v14.13.0
- Docker