Here is popwaifu.click backend project.
Frontend project is on popwaifu-web
- Install Node.js
I use 14.17.6 when writing this, recommend using NVM to install Node.js - Install MongoDB and Redis
- git clone this project
- run
npm install
- run
npm run build_web
to build frontend file - run
npm run server_dev
to start a develop server
- config folder put some config file, you can change your MongoDB connection config here
- dev-script folder put some script help develop, you can use insertWaifu.js to quickly put some waifu into your DB
- popwaifu-web folder is a git submodule folder, it link to popwaifu-web project
- src folder is our source code folder
I try to follow this video's architecture
entity is the basic object, you can use repository object to get a entity object.
For example, you can use WaifuRepo.getByUrlId() to get a Waifu, and WaifuRepo's methods should be the only way how you get this entity.