Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mmraisi/fastify-jwt-typeorm
https://github.com/mmraisi/fastify-jwt-typeorm
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mmraisi/fastify-jwt-typeorm
- Owner: mmraisi
- License: mit
- Created: 2024-03-31T04:51:34.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-04-12T21:45:00.000Z (9 months ago)
- Last Synced: 2024-04-14T01:05:26.831Z (9 months ago)
- Language: TypeScript
- Size: 393 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Fastify JWT app (TypeORM, Postgresql)
Node.js project demonstrating the integration of Fastify, Fastify JWT, and TypeORM with PostgreSQL for building a robust API.
## Features
- Utilizes Fastify for blazing-fast web server development.
- Implements JWT-based authentication with Fastify JWT.
- Integrates TypeORM for seamless interaction with a PostgreSQL database.
- Provides CRUD operations for managing resources.## Prerequisites
- Node.js installed on your machine
- PostgreSQL installed locally or accessible remotely
- Git for cloning the repository## Installation
1. Clone the repository:
```bash
git clone
```2. Install dependencies:
```bash
cd
make install
```## Usage
To start the server using Docker Compose, make sure you have Docker installed on your machine. Then, navigate to the project directory and run the following command:
> Install all dependencies
```bash
make install
```
> Run the postgres db in the background
```bash
make db
```
> Run the application in the foreground
```bash
make start
```
To run all tests:
```bash
make test
```To stop the server and remove the containers, use the following command:
```bash
make stop
```To clean up the project by removing running containers, volumes, node_modules, coverage, src/openapi.json, and dist, use the following command:
```
make clean
```## API Documentation
To run the docs server:
> [!NOTE]
> THE `make start` will run both the server and docs, to run the docs image alone, use the following command```
make docs
```> You can access the OpenAPI documentation for the API at [http://localhost:8080](http://localhost:8080). This documentation provides detailed information about the available endpoints, request parameters, responses, and schemas.
## Contributing
Contributions are welcome! If you find any issues or would like to propose enhancements, please open an issue or submit a pull request.
## License
This project is licensed under the [MIT License](LICENSE).