Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/terieyenike/neondb-with-auth0
Secure your backend APIs with Auth0 and Node.js using the NeonDB as an example
https://github.com/terieyenike/neondb-with-auth0
auth0 authenti ejs express javascript neon nodejs
Last synced: about 5 hours ago
JSON representation
Secure your backend APIs with Auth0 and Node.js using the NeonDB as an example
- Host: GitHub
- URL: https://github.com/terieyenike/neondb-with-auth0
- Owner: Terieyenike
- Created: 2023-12-05T20:56:46.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2023-12-10T02:47:38.000Z (12 months ago)
- Last Synced: 2024-04-24T09:41:06.557Z (7 months ago)
- Topics: auth0, authenti, ejs, express, javascript, neon, nodejs
- Language: EJS
- Homepage: https://neondb.onrender.com/
- Size: 1.16 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Setup Auth0 and Postgres using Neon
Neon is a cloud-native serverless Postgres database which enables you spin up a database instance quickly and connect with it has features like autoscaling, branching, and bottomless storage with its architecture that support separate compute and storage.
Get started with [Neon](https://console.neon.tech/sign_in) and [Auth0](https://auth0.com/signup?place=header&type=button&text=sign%20up).
This app is a Node.js backend API where [node-postgres](https://node-postgres.com/) is used to query the database in Neon and returning the data as JSON.
### Demo
[![neon app with auth0](https://cdn.loom.com/sessions/thumbnails/99535d8cd3214a1ba284d38921322e18-with-play.gif)](https://www.loom.com/share/99535d8cd3214a1ba284d38921322e18)
![student info from neon db](https://github.com/Terieyenike/neondb-with-auth0/assets/25850598/dc296927-4d8c-47d5-84e1-a220b4c696f0)
## Deployed app
Test this web app: https://neondb.onrender.com/
### Setup
**Clone the repo and install dependencies**
```
$ git clone https://github.com/Terieyenike/neondb-with-auth0.git
$ cd neondb-with-auth0
$ npm install
```### Environment variables
Head over to your dashboard in Neon and copy-paste the connection string and replace the dummy data with yours in [.env.local](.env.local)
### Start the server
```
$ npm run dev
```### Tech stack
- Express
- node-postgres
- Embedded JavaScript (EJS)
- Neon
- Auth0### Author
- [Teri](https://x.com/terieyenike)