AJAX

Step 2: In server programming, a lot of content is dynamic, because it depends on the server state. But things like style sheets, scripts, and images do not change, so they are called static files. Create a new folder for your static files by clicking the folder icon in the top left, and name it public. Create a style sheet and script within the public folder. Go to index.js, and add the following below the app variable:
app.use(express.static(`public`))
This is an example of middleware, which processes requests and passes them on to additional middleware or an endpoint. In this case, the middleware is exposing static files within the public folder to be accessible by clients.
Last step Next step