gbowne1 / RadioLogger

A Radio Logging application build with NodeJS and ExpressJS
GNU General Public License v3.0
6 stars 7 forks source link

Implement middlewares server #11

Closed jzunigarce closed 1 year ago

jzunigarce commented 1 year ago

Details

gbowne1 commented 1 year ago

This looks good.

Merging.

gbowne1 commented 1 year ago

Today, I added boilerplate tests for mocha and chai to use

gbowne1 commented 1 year ago

I think we should move from ejs template engine to just serving the static files

So we would need to add:

app.use(express.static('public'))

and

remove the app.engine('html', require('ejs').renderFile); since all of our assets are coming from /public in the client and we are not using pug, ejs etc.

jzunigarce commented 1 year ago

Static files just represent data and are manipulated with js? or render variables from the backend?

gbowne1 commented 1 year ago

Yes. The html, css and js of the routes other than the dashboard all interact with the database through forms. And also display returned values from the database in a table.

The /data/*.json all fill dropdown selects with values. I need to finish up and add the last of that json data.

The dashboard is controlled by the app.js and index.js and the server.js

Click on a button on a dashboard card will switch the routes using js.

Models need to be finished as well.