Here is the structure of my folder: server.js app --routes.js views --ace-builds-master --\src-noconflict --ace.js --index.ejs
The 'views' directory contains my ace editor components and my index.ejs file. I am trying to include ace.js in my index.ejs file. Should I create a route in my express routes like this:
app.get('/ace', function (req, res) {
res.sendFile('\ace-builds-master\src-noconflict\ace.js');
});
And should I reference it in my ejs file like this:
<script src="/ace" type="text/javascript" charset="utf-8"> </script>
When I load it in the browser, I get a "GET http://localhost:8080/ace" error message.