您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

3 年前
3 年前
1234567891011121314151617181920212223242526272829303132
  1. # Node API template
  2. This is template of web API with mongo db as database node.js as runtime and express as framework. We have user model and JWT tokens setup as well as mediator pattern and winston as logger.
  3. ## Setup
  4. Here we will show you how to set up project and run it in localhost. If you want to run it in [docker]() or [portainer]() you can find setup on links.
  5. - [Project setup](#project-setup)
  6. - [Database setup](#database-setup)
  7. ### Database setup
  8. Please follow the official tutorial on installing and running the latest Mongo database which can be found on this link:
  9. > https://docs.mongodb.com/manual/tutorial/install-mongodb-on-windows/
  10. ### Project setup
  11. In order to run our project you need to clone it from [git](https://git.dilig.net/stefan.stamenovic/diligent-node-api) first. Open terminal (cmd and powershell work as well) in folder that you want this project to be and run command
  12. > git clone http://git.dilig.net/stefan.stamenovic/diligent-node-api.git
  13. After cloning project you can open it with your preferred IDE/Code editor if you want to see the code. Before running project you need to open terminal and run command
  14. > npm install
  15. Running that command will download all necessary npm packages to run the project.
  16. After that you want to move to src directory
  17. > cd src
  18. Now you can run the project using
  19. > node server.js
  20. Congratulations! You now ran backend api for template. You can see swagger documentation in the browser with the url
  21. > http://localhost:3001/swagger