I'm creating a chat, using server Express
of NodeJS
and AngularJS
for manager in client side
But when I try include /js/code.js
in my html
, it can not found, because is not routed by Express
<!-- my include in html -->
<script src="./js/code.js"></script> <!- this is not found in execution -->
Meu index.js:
var app = require('express')();
var http = require('http').Server(app);
var io = require("socket.io")(http);
app.get('/', function(request, response){
response.sendFile(__dirname + '/index.html');
});
How to can I fix this problem, without route all js file I will using in my project or routing all js file in path a lot?