Skip to main content

Installing Current

Due to Current's front-end and back-end separation design, you need to use a process manager to start and maintain both the front-end and back-end services separately.

System Requirements:

  • Python 3.9+
  • Node.js 18+, npm 8+
tip

It is recommended to install Git and use the command git clone https://github.com/DongYing-No-1-Middle-School/Current.git to download the Current program, which will make future upgrades more convenient.

Installing the Back-end

  1. Navigate to the /backend directory.
  2. Use pip to install the dependencies:
pip install -r requirements.txt
  1. Run the back-end service:
python app.py

By default, the back-end service will run on http://localhost:5000. You can alter the configuration in app.py to change the port.

info

We also support running the back-end service using gunicorn. After installing gunicorn, you can start the back-end service with the following command:

gunicorn app:app

The back-end service will run on http://localhost:8000.

  1. Open the back-end service address in your browser and follow the instructions on the webpage to complete the back-end setup.
  2. Restart the back-end service to apply the configuration changes.

Installing the Front-end

  1. Make sure you have pnpm installed. If you do not have pnpm installed, install it using the following command:
npm install -g pnpm
  1. Navigate to the root directory of the project and install the dependencies:
pnpm install
  1. If your back-end service does not run on port 5000, edit next.config.js and replace all instances of http://localhost:5000 with the address of your back-end service.
  2. Build the Next.js project:
pnpm build
  1. Run the front-end service:
pnpm start

The front-end service will run on http://localhost:3001, and you can choose to use any reverse proxy/intranet penetration tool.