I've created a simple nodejs express application:
const express = require("express");
const app = express();
app.set("views", path.join(__dirname, "views"));
app.listen(3000, => (req, res) {
res.sendFile("index.html")
})
It throws an exception:
app.listen(3000, => (req, res) {
^^
SyntaxError: Unexpected token =>
via Dorion
No comments:
Post a Comment