+ next to
public/foo.js, and paste in your code.
Then use a script tag in your html:
On the back-end, you'll need to serve this file to browsers that visit your project's live site.
For example, use
express.js. Update your
server.js to include:
var express = require('express');
var app = express();
And make sure you've added the package to the backend. Click on
package.json then 'add package', and type in 'express'.
Finally, make sure that the server.js is started in
"start": "node server.js"