Github address of the project
Project purpose
This project starts from the creation of their first habit, one check-in every day, after check-in can publish the experience of the day, these experiences will be published in the community, other users can collect and comment on a certain experience; The goal is to slowly develop the habit of following yourself throughout your life through daily recording and continuous positive feedback.
Technology stack
The front end
- react
- react-redux
- redux-saga
- react-router(v4);
- Ant Design Mobile
- webpack
- babel
- postCss
The back-end
- express
- mongodb
Quick start
I’m assuming you’ve installed itThe node environment
Operation steps:
Download the project to local;
Two, respectively inhabit-app-master/server
andhabit-app-master/fontEnd
Type the commandnpm install
;
Third, inhabit-app-master/server
Create the following folders or files under the directorystatic/upload
anddata/log/mongodb.log
,data/db
;
Iv. This project usesmongodb
Database, so it needs to be installedMongoDB, the local is Window, so the window platform version is selected;
- Download and install MongoDB
bin
Directory to create filesmongodb-habit.conf
, and enter the following configuration
Dbpath = local absolute path \habit-app-master\server\data\db logpath = local absolute path \habit-app-master\server\data\log\mongodb.log
port=27017
Copy the code
- Enter at the command line
bin
Directory, entermongod -config ./mongodb-habit.conf
Press Enter to start the database
Package front-end projects
- project-entry
fontEnd
Directory, enter the commandnpm run build
, wait a moment and the packaged file will be output tohabit-app-master/fontEnd/build
; - I packed it up
static
andapp.js
Moved tohabit-app-master/server/static
;
6. Start the server
- project-entry
server
Directory, enter the commandsupervisor ./bin/www
That is, open successfully;
Finally, open http://localhost:3008 in your browser and see the image below