A simple EJS template for use in web development projects
npm run dev
npm run watch-css
A server should be opened up at http://localhost:8080.
The port may be modified using the PORT
variable in the server.js
file.
routes.js
— This file is used for routing the different views of the frontend dynamicallyserver.js
— This file is used to setup the environment and serve the responses contained inroutes.js
routes.js
— Holds the dynamic route to serve the dynamic views generated byviews/root.ejs
. It does this by taking the route along with the query parameters and inputting it intoviews/root.ejs
for processingroot.ejs
— Holds the logic that serves routes dynamically fromviews/pages
using the data inputted:route
— The routeparams
— The query parameters which may be accessed usingparams.get(<parameter>)