- Docker and Docker Compose installed
- Node.js and npm installed
-
Clone the repository:
git clone <repository-url> cd <project-directory>
-
Create a
.env
file in the project root with the following content:DB_HOST=localhost DB_PORT=5432 DB_USER=diego DB_PASS=gplatac95 DB_NAME=outbuild
Adjust the values as needed.
-
Start the database container:
npm run db:up
or
docker-compose up -d
-
Install project dependencies:
npm install
-
Run database migrations:
npx sequelize-cli db:migrate
- Docker and Docker Compose installed
- Node.js and npm installed
- PostgreSQL client (optional, for direct DB access)
- Create
.env
file in project root:
npm test npm test -- path/to/test.js
- Node.js and npm installed
- Install dependencies:
npm install
- Generate API documentation:
npm run docs
- View documentation:
- Open docs/ 669E index.html in your web browser
- Documentation includes all API endpoints, request/response formats, and examples
- API documentation source is in apidoc/routes.js
- Make changes there and re-run npm run docs to update
- Configuration is in apidoc.json
-
View Docker container logs:
docker-compose logs
-
Stop the database container:
docker-compose down
-
Undo all migrations:
npx sequelize-cli db:migrate:undo:all
-
If you encounter permission issues with Docker, ensure your user is part of the
docker
group:sudo usermod -aG docker $USER
Log out and log back in for the changes to take effect.
-
If migrations fail, check your database connection settings in
.env
andconfig/config.js
. -
If tests fail due to DB connection, ensure Docker container is running: docker ps
- User auth was not an explicit requirement so I avoided. JWT and API keys can be implemented for added security.
- Caching can be implemented w Redis but rn would be overkill.
- Connection pooling for database
- DTOs