This is a micro-service boilerplate written with Javascript and implemented using Node.js (Express), MongoDB (Mongoose), Redis, Jest, Socket.io and OpenAPI (Swagger). You can use it to initiate your own server-side application.
Your can write your complete description about this app here...
What you need to install before running this app ex: Make sure you have git, nvm, npm, Node.js installed
- Clone the project
git clone https://github.com/amin4193/javascript-boilerplate.git
- Go to the project folder and run:
npm i
- Install MongoDB and Redis in your system and set necessary configurations.
- Do not forget to check your environment settings in
.env
You can start the project by:
npm start
You can also install nodemon globally in your system and simply use code below:
npm i -g nodemon
nodemon
For security reasons, you should put "sslCert" folder into .gitignore
file in production mode.
For test we used Jest for functional testing and unit testing. you can write your own tests in __test__
folder by creating new your_entity.test.js
and then just run:
npm run test
Note: After development and test, you should put the following script in .gitignore
file to prevent pushing tests files in production mode repositories:
# test folder
__tests__
You can simply set your own configs in docker-compose.yml
file and run:
sudo docker-compose up --build -d