Lets talk about the logic:
The logic itself for such a skeletal app is quite simple. First thing, we get ourselves a url using POST parameters, and then We use various ID generators, and generate one during the POST req We store both the recieved link and the generated ID in our DB Then, we use a GET req, and using parameters, we search for that ID in our DB If Found, we redirect them to the page it is linked with If not, we send a error 400 bad req to the server.
For now, this is what i've learnt from this project.
locals
is where stuff from db is stored in SSR- helpful for conditional statements or situations where we need to check
- SSR isnt the most necessary thing for backend, frontend frameworks handle those stuff
- every thing from backend for now is a pass and play of POST and GET requests
Make Sure To Think Outside The Box Always.
- Go through Static Routers, form actions, ejs logic from time to time.