This is a submission for my school's backend web development (BED) assignment.
The app is hosted on https://bed-assignment-2.deploy.cnoside.dev
Frontend
Backend
- Express.js, a backend web framework
- MySQL, a SQL database
apps/api
: API powered by expressapps/web
: web app powered by next.jspackages/eslint-config-custom
:eslint
configurations (includeseslint-config-next
andeslint-config-prettier
used byapps/web
)packages/scripts
: scripts used throughout the monorepo (includescustom-commit
for formatting git commits)
- Turborepo for building monorepos
- TypeScript for static type checking
- Jest for running tests
- Supertest for testing APIs
- ESLint for code linting
- Prettier for code formatting
- npm: ^8.0.0
- node: ^16.0.0
- MySQL Server
Refer to .env.example
in both apps/api
and apps/web
.
Create .env
in apps/api
and .env.local
in apps/web
.
Linux (Bash)
cd bed-assignment-2/bin
chmod 700 db.sh
./db.sh
Windows (PowerShell)
cd bed-assignment-2\bin
./db.ps1
For Development
To develop all apps and packages, run the following command:
# Ensure that NODE_ENV=development
cd bed-assignment-2
npm run dev
For Production
To start the app for production, run the following commands:
# Ensure that NODE_ENV=production
cd bed-assignment-2
npm run build
npm run start
By default the only admin is root
- Email: root@admin.com:
- Password: 1q!Q1q!Q
The root admin password should be changed after the first login.
Then, add more admins with the web interface