My app.js file looks like this, I am trying to have my root point to a tic tac toe game.
app.set('port', (process.env.PORT || 5000))
//serve static files in the public directory
app.use(express.static('public'));
// Process application/x-www-form-urlencoded
app.use(bodyParser.urlencoded({
extended: false
}))
// Process application/json
app.use(bodyParser.json())
// Index route
app.get('/', function (req, res) {
res.sendFile('index.html',{root:"./Tic-Tac-Toe"});
})
In my index.html in the ./Tic-Tac-Toe dir, I am linking some files that cannot seem to be found by the server.
<link rel = 'stylesheet' type = 'text/css' href = 'ui.css'>
<script src = "jquery-1.10.1.min.js"></script>
<script src = "ui.js"></script>
<script src = "game.js"></script>
<script src = "ai.js"></script>
<script src = "control.js"></script>
