This project is a small service built with Nest.js dedicated to handling image uploads, such as avatars, post covers, and other assets.
Follow these instructions to set up the project on your local machine for development and testing purposes.
- Clone the repository to your local machine:
git clone https://github.com/andreacw5/fileharbor.git
- Install dependencies:
yarn install
- Start the application in development:
yarn start:dev
- Visit
http://localhost:3000
in your browser to use the application.
- Nest.js - A progressive Node.js framework for building efficient, reliable and scalable server-side applications.
- Prisma - Open source Node.js and TypeScript ORM with a readable data model, automated migrations, type-safety, and auto-completion.
# install dependencies
$ yarn install
# Run the application in development mode
$ yarn run start:dev
# Run the application in production mode
$ yarn run start:prod
# unit tests
$ yarn run test
# e2e tests
$ yarn run test:e2e
# test coverage
$ yarn run test:cov
Contributions are welcome! If you want to contribute to this project, please follow these steps:
- Fork the repository.
- Create a new branch (git checkout -b feature/your-feature).
- Make your changes.
- Commit your changes (git commit -am 'Add new feature').
- Push to the branch (git push origin feature/your-feature).
- Create a new Pull Request.
code | description | default value |
---|---|---|
DATABASE_URL | database url | |
APP_PORT | app port | 3000 |
APP_URL | app url | |
CACHE_TTL | Cache ttl value | 60 |
API_KEY | auth token for CUD Endpoints | |
LOGS_TOKEN | logs token |
This project uses a Pino transporter that sends logs to Betterstack. To enable this feature, set the LOGS_TOKEN
environment variable to the token provided by Betterstack.
Authentication is based on a single static token stored in the API_KEY
environment variable. Requests for create/edit/delete URLs require the X-API-KEY
header with the value of API_KEY
.
We use SemVer for versioning. For the versions available, see the tags on this repository.
This project is licensed under the MIT License - see the LICENSE file for details