New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deploy basic API routes #90
Conversation
Signed-off-by: Vu Van Dung <joulev.vvd@yahoo.com>
In `packages/client`, run `yarn copy:server` before running `yarn build`. This command will copy all `ts` files from `@ezkomment/server` into `@ezkomment/client`. Then, Next.js shall do its work. Note: we still need to resolve the problem with dependencies of `@ezkomment/server` after we copied it.
Come on... WHY??? How on this f*cking actual earth does this make any sense whatsoever? 😭 Disadvantages to using a monorepo to develop one single app
Advantages to using a monorepo to develop one single app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move everything away from packages/server
so that we can convert the whole monorepo to a normal repo immediately after merging.
See reasons in #90 (comment). Although they should already be painfully obvious already that I don't need to write them all down.
I will use symlink for easier navigation on my local machine.
Done, removed it. |
Okay sorry for the outburst earlier, I was really angry but I have calmed down now. Nevertheless, I would like the Orbital code to be as clean and low of workarounds as possible. Something that I can be proud of, even years into the future, instead of workarounds that will inevitably spiral into pieces of spaghetti. Therefore I do not and will not allow code not meeting my personal standard to be merged to |
Can't really avoid merge commits every time... Signed-off-by: Vu Van Dung <joulev.vvd@yahoo.com>
Codecov Report
@@ Coverage Diff @@
## main #90 +/- ##
=======================================
Coverage 98.75% 98.75%
=======================================
Files 30 30
Lines 403 403
Branches 95 95
=======================================
Hits 398 398
Misses 5 5
|
All scripts and files to copy
server
intoclient/lib
andclient/pages/api
have been moved toserver
. Only necessary files for the deployment will be copied.I will keep the
server
directory.Currently, the
api/users/[uid]
routes support getting users' information, updating users, and deleting users.POST
andDELETE
requests will only be allowed only if the request is authenticated. Calluser.getIdToken()
to get the id token of the user, then addauthorization: 'Bearer ${idToken}'
to the headers of thesePOST
andDELETE
requests.The
api/users/[uid]/sites
list all sites of a particular user, using aGET
request.The
api/sites
andapi/pages
routes are used to create sites and pages, respectively. The model for these request are to be changed as we progress, so currently any fields sent in the request body will be stored.In this PR, we will concentrate on testing the
api/users/[uid]
routes and the usage of id token to authenticatePOST
andDELETE
requests.