https://github.com/morzhanov/nodejs-reverse-proxy-example
Simple reverse-proxy server based on Nginx NodeJS and PostgreSQL.
https://github.com/morzhanov/nodejs-reverse-proxy-example
awilix awilix-koa babel docker docker-compose jsonwebtoken jwt koa2 nginx nginx-proxy nodejs postgresql reverse-proxy typeorm
Last synced: 8 months ago
JSON representation
Simple reverse-proxy server based on Nginx NodeJS and PostgreSQL.
- Host: GitHub
- URL: https://github.com/morzhanov/nodejs-reverse-proxy-example
- Owner: morzhanov
- License: mit
- Created: 2018-10-12T10:43:26.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-10-15T15:42:44.000Z (about 7 years ago)
- Last Synced: 2025-03-27T15:22:15.373Z (9 months ago)
- Topics: awilix, awilix-koa, babel, docker, docker-compose, jsonwebtoken, jwt, koa2, nginx, nginx-proxy, nodejs, postgresql, reverse-proxy, typeorm
- Language: JavaScript
- Homepage:
- Size: 64.5 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NodeJS reverse-proxy example

Simple reverse-proxy server based on Nginx NodeJS and PostgreSQL.
NodeJS part of this project is based on nodejs-koa-boilerplate
## Installation
Use these steps to install project
1. Install Docker: https://www.docker.com/
2. Build project: `docker-compose build`
3. Run docker-compose: `docker-compose up -d`
4. Stop containers: `docker-compose down`
For local development (NodeJS) pass variables in .env file and use local PostgreSQL database (you can use official Docker container).
## NodeJS project folders structure
This boilerplate contains such folders:
- /src - main sources folder.
- /src/constants - app constants.
- /src/controllers - contain controllers that receives requests from routes, executes business logic via services and returns responses to client.
- /src/db - contain scripts to setup and manage database
- /src/middleware - app middlewares
- /src/entities - database entities
- /src/services - services contains logic to manage database, execute requests to other servers, change application behabior, and etc.
- /src/app.js - app configuration
- /src/index.js - contain main scripts that configures and run server
- /test - contains tests for controllers, services and other parts of application.
## NodeJS project scripts
- start - run dev server using nodemon
- build - build project
- serve - run built files
## Main Technologies and libraries
- Docker
- NodeJS
- Nginx
- PostgreSQL
- KoaJS
- Babel
- jsonwebtoken
- typeorm
- awilix
- awilix-koa
- koa-bodyparser
- koa-cookie
- koa-router
## Contributing
1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D
## Author
Vlad Morzhanov
## License
#### (The MIT License)
Copyright (c) 2018 Vlad Morzhanov.
You can review license in the LICENSE file.