this is an very basic api that handles user and admin access control already with some tests
the .env file needs to have 3 fields
- SUPABASE_URL
- which looks like this: https://abcdefghijklmnopqrst.supabase.co
- SUPABASE_PUBLIC_KEY
- which is the anom jwt from supabase
- SUPABASE_JWT_SECRET
- which don't need explanation
to run the project you can open your terminal and run:
yarn start
to start directaly from typescriptyarn dev
to watch that typescriptyarn build && node .
(ornode build/server.js
)
- [ GET ] /
- only returns a live signal
- [ POST ] /signup
- create an account
- [ POST ] /login
- login to an account
- [ GET ] /user-content
- see the user content if it's logged in
- [ GET ] /admin-content
- see the admin content if have the permission