This project is a web application with:
- Backend: Node.js (Express)
- Frontend: Next.js
- Database: PostgreSQL (started via Docker Compose)
- ORM: Knex.js
Follow these steps to set up and run the project for the first time:
Open a terminal in the project root and run:
docker-compose up -d
cd backend
npx knex migrate:latest
npx knex seed:run
cd ..
docker exec -i postgres_db psql -U museion_user -d museion_db < init.sqlYou can check if the database is running and the tables are created:
docker exec -it postgres_db psql -U museion_user -d museion_dbOnce inside the database shell, list the tables:
museion_db=# \dtFirst terminal (Frontend):
cd frontend
npm install
npm run devSecond terminal (Backend):
cd backend
npm install
npm run devVisit http://localhost:3000/ in your browser.
Create a .env file (not included in the repository) with the following content:
DB_HOST=postgres
DB_PORT=5432
DB_USER=museion_user
DB_PASSWORD=pwd
DB_NAME=museion_db