-
db
Library containing ZModel schema and exports a function for getting an enhanced PrismaClient given a user id.
-
api
A simple Express.js API.
Make sure nx is installed globally.
- npm install
- nx run db:generate
- nx run db:push
- nx run db:seed
- nx serve api
You can then send a request to http://localhost:3000 to fetch posts:
-
Fetch with user#1
curl -H "X-USER-ID:1" http://localhost:3000
-
Fetch with an anonymous user
curl -H http://localhost:3000