This is PART-1 of the series for my entry in the hackathon.
The Idea
For the hackathon, I decided to complete my Open CSS Loaders and host it on the Digital Ocean platform.
So I began the work. The cover image you see is the design I had in mind. The top Being the Header "Open CSS Loaders", then a hr, the links to my social media accounts, followed by a quote, and the two buttons, one for adding a code and the other to set editor theme.
The work
But this was the front end. First I started with the backend on Node.js and Express.
Install the basic packages.
npm i express request mongoose dotenv body-parser --save
Now, it was just defining the routes and testing them which was pretty straightforward. So as of now I have the following routes:-
-
/
=> the home page -
/getquote
=> to get a quote -
/api/serveranypopup
=> to check if there is any popup message to show on the page -
/api/setpopup
=> to set a popup message -
/api/getloader
=> to get all the loaders -
/api/addthiscode
=> to add a code -
/api/like/:loaderid
=> to like a loader
There are other routes for managing the page
-
/iamadmin
=> to go to the admin page -
/api/updatecode
=> it requires a password to update any code -
/api/iamgoingtodeletethispost
=> it deletes any of the loader but requires password
Top comments (0)