Inspired by Bulletproof node.js project architecture.
For development, you will only need Node.js and a node global package, npm, installed in your environement.
Your Node.js version should be at least 13 and npm version 6.13.
-
Just go on official Node.js website and download the installer. Also, be sure to have
git
available in your PATH,npm
might need it (You can find git here). -
You can install nodejs and npm easily with apt install, just run the following commands.
$ sudo apt install nodejs $ sudo apt install npm
-
You can find more information about the installation on the official Node.js website and the official NPM website.
If the installation was successful, you should be able to run the following command.
$ node --version
v13.3.0
$ npm --version
6.13.1
$ git clone https://github.com/NazarGorokhivskiy/SoftwareDocumentationDesign.git
$ cd SoftwareDocumentationDesign
$ npm i
$ npm i -g dotenv
Create .env
file in the root of your project. You have to specify the following env variables:
# Database config (MSSQL)
DB_NAME=
DB_HOST=
DB_USERNAME=
DB_PASSWORD=
# Azure Redis
REDIS_HOST=
REDIS_PORT=
REDIS_PASS=
# EVENT HUBS "Connection string–primary key" for Event Hubs Instance
EVENT_HUBS_URL=
# AWS SQS
AWS_SQS_URL=
# POSSIBLE VALUES: CONSOLE | SQS | EVENT_HUBS
PRINT_STRATEGY="CONSOLE"
Berfore running the project in development, at first you need to install nodemon util by runnung the following command
$ npm i -g nodemon
After that you should be able to freely run the project:
$ npm run dev
$ npm start