Projects platform between non-profit organizations (NPO) and students.
Install dependencies.
npm install
Define your environment variables in a .env
file, in KEY=VALUE format. If deploying to GAE, you can write them in your app.yaml instead.
ENV | Default | Description |
---|---|---|
DOMAIN | localhost | Domain serving both FE and BE |
FE_ADDR | http://localhost:3000 | Frontend service address |
BE_ADDR | http://localhost:3100 | Backend service address |
PORT | 3100 | Port exposed to serve backend |
DB_SOCKET | null | Socket path for unix domain (GCP) |
DB_HOST | localhost | MySQL hostname |
DB_PORT | 3306 | MySQL port |
DB_USER | root | MySQL username |
DB_PASS | null | MySQL password |
DB_NAME | null | MySQL database name |
JWT_SECRET | jwt-secret | JWT secret key |
EMAIL_ADDR | null | Mailer email |
EMAIL_ANME | null | Mailer name |
GOOGLE_CLIENT_ID | null | Google client ID |
GOOGLE_PROJECT_ID | null | Google project ID |
GOOGLE_CLIENT_SECRET | null | Google client secret |
GOOGLE_AUTH_CODE | null | Google one-time auth code (for setup) |
GOOGLE_ACCESS_TOKEN | null | Google access token |
GOOGLE_REFRESH_TOKEN | null | Google refresh token |
ALGOLIA_APP_ID | null | Algolia app ID |
ALGOLIA_API_KEY | null | Algolia admin PI key |
npm run dev
Pre-commit linting has been automated but will not fix errors.
# To fix minor style errors
npm run lint:fix
# To lint
npm run lint
npm run build
npm start
Create your app.yaml for GAE, then run
npm run deploy
Use apiDoc for in-line API documentation. It's configured to re-build on every save during development, and served in /documentation
.