Local development
Requirements
For macOS users, you can install them by Homebrew:
For Windows users, you can install them by Chocolatey:
Environment variables
Server
Copy .env.example
to .env.local
file in packages/server
directory. How to match .env? Refer to: Environment Variables
Webapp
Copy .env.example
to .env.local
file in packages/webapp
directory. All of these environment variables are not necessary during webapp
compiling, as the server
will pass them when rendering the HTML.
Name | Type | Required | Description |
---|---|---|---|
VITE_HOMEPAGE_URL | String | ✅ | Homepage URL (e.g. http://127.0.0.1:3000) |
VITE_COOKIE_DOMAIN | String | ✅ | Cookie domain (e.g. 127.0.0.1) |
VITE_STRIPE_PUBLISHABLE_KEY | String | https://docs.stripe.com/keys | |
VITE_GEETEST_CAPTCHA_ID | String | https://docs.geetest.com/captcha/overview/guide#Step-1-Get-your-captcha-ID-and-KEY | |
VITE_GOOGLE_RECAPTCHA_KEY | String | https://cloud.google.com/recaptcha-enterprise/docs/create-key-website | |
VITE_DISABLE_LOGIN_WITH_GOOGLE | Boolean | Is it allowed to log in with Google? | |
VITE_DISABLE_LOGIN_WITH_APPLE | Boolean | Is it allowed to log in with Apple? | |
VITE_VERIFY_USER_EMAIL | Boolean | Whether it is necessary to verify the email addresses of the new users |
Setup
Run dev server
The NodeJS server will run on http://127.0.0.1:8000
and web app will run on http://127.0.0.1:3000
.