ROOT │ ├─server // provide blog server api, based one nodejs, mongodb │ client // client ui │ ├──web // front-end ui │ ├──admin // admin ui │ ├─docker-compose.yml // docker-compose config file
git clone https://github.com/bs32g1038/node-blog.git
cd ** npm install
3，init database data
// this will generate the faker data to database npm run init:dev:data
npm run dev // development mode
4, build dist
npm run build // build dist for server and client
The project has integrated related suites, such as client ui, dockerfile, docker-compose.yml. So you can easy to deploy the project.
First: I recommend that you debug locally and make changes to configuration information, such as database information and personal information.
Secondly: you can choice the docker to deploy this project. It is very esay. you only
pull the project to your server and install
docker, and run
docker-compose build command, and run
docker-compose up -d command
If you don't want to use docker, you must to
cd the current item and run
npm install or yarn install command.
At the same time, when finish install, you need to run
npm run start:prod command.
Besides, you may need to install
mongodb,before you run the application.
Operating System: Linux, OS X or Windows.
Node.js Runtime: 12.x or newer; it is recommended that you use LTS Releases.
database: mongdb 4.x or newer;
Modern browsers and IE11.
|IE / Edge||Firefox||Chrome||Safari||Opera|
|IE11, Edge||last 2 versions||last 2 versions||last 2 versions||last 2 versions|
If you think these contents are useful to you, please add a "Star" at the top right. This is the encouragement to me, thank you!