- create: add todos
- read: view details of todos
- update todos
- delete todos
- (check off todos (done = grey out))
- (remember todos when coming back)
- initiate npm project (potentially install requirements):
npm init -y
- install express:
npm install express
- install ejs (template language):
npm install ejs
- (install nodemon (if not already installed globally):
npm install -g nodemon
(so that you don't need to restart server after every edit)) - (install express
method-override
to handle put, patch, delete, etc. methods) - (install bootstap (or other frontend toolkit))
- (use unique IDs for database entries: install & import
npm install uuid
)
- setup default express app (
index.js
)- define express routes (
app.get()
,app.post()
, etc.)
- define express routes (
- create & specify path to static files:
public/css
&public/js
- create & specify path to
views
(including partials;):/views/partials
- specify which kind of data server can receive/handle:
express.urlencoded
/express.json
(for http methods beyond GET) - enable usage of HTTP methods beyond GET & POST (
method-override
) - enable usage of ejs
- build ejs templates & partials (HTML/ejs)
- define & connect style sheet(s) in
public/css
- (include/connect frontend toolkit (bootstrap, tailwind, bulma, material, ...))
- include partials in views ejs files
- browser can only handle GET & POST
- use
method-override
middleware to modify query parameters of post requests in to send data via different HTTP methods (e.g. DELETE, PATCH, etc.)
- use
- (hoppscotch.io for API testing)
- EJS for templating
- expressJs for routing!?
- nodemon (during development)