https://github.com/oktadev/okta-nestjs-postgres-example
Sample application using NestJS and Postgres
https://github.com/oktadev/okta-nestjs-postgres-example
Last synced: 9 months ago
JSON representation
Sample application using NestJS and Postgres
- Host: GitHub
- URL: https://github.com/oktadev/okta-nestjs-postgres-example
- Owner: oktadev
- License: mit
- Created: 2020-02-25T00:27:23.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-03-03T13:31:40.000Z (almost 3 years ago)
- Last Synced: 2025-03-25T11:21:23.478Z (10 months ago)
- Language: TypeScript
- Size: 318 KB
- Stars: 13
- Watchers: 4
- Forks: 7
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Build a Simple API with NestJS and Postgres Example
This project is an example for the [Build a Secure NestJS API with Postgres](https://developer.okta.com/blog/2020/02/26/build-a-secure-nestjs-api-with-postgres) blog post.
## Requirements
- [Node.js](https://nodejs.org) version 8+
- [Docker Desktop](https://www.docker.com/get-started)
- A free [Okta developer account](https://developer.okta.com)
## Setup
1. Clone or download this repository
1. Run `npm install` to install the project dependencies
1. Copy `.env.sample` to `.env`
1. Add a new Service application to your Okta developer account named "Instamiligram"
1. Add a new Okta API token (API -> Tokens -> Create Token) and copy this token to the `.env` file to replace `{yourApiToken}`
1. Update `.env` and replace `{yourOktaDomain}` with the URL for your Okta account (e.g. `dev-123456.oktapreview.com`)
1. Run the following commands
```sh
docker-compose up -d
npx nodemon server.js --ext ts
```