Skip to content

Latest commit

 

History

History
28 lines (20 loc) · 1.36 KB

README.md

File metadata and controls

28 lines (20 loc) · 1.36 KB

popwaifu

Here is popwaifu.click backend project.
Frontend project is on popwaifu-web

run server

  1. Install Node.js
    I use 14.17.6 when writing this, recommend using NVM to install Node.js
  2. Install MongoDB and Redis
  3. git clone this project
  4. run npm install
  5. run npm run build_web to build frontend file
  6. run npm run server_dev to start a develop server

file architecture

  • 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

src

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.