Reputation: 1536
I am trying to parse my csv file in server and return back the information after parsing and analyzing the data in csv.
I am not that used to express and i dont know any view engine.
I plan to use
res.sendFile(path.join(__dirname, "/index.html"));
to host my index file.
What are the other way than ajax and view template that can I send data to the index.html with sendFile.
I am sending JSON files from server to client
Any kind of help is appreciated !!!
Upvotes: 0
Views: 508
Reputation: 944301
When a client (such as a browser) makes a request you can respond with one thing.
You can respond with:
static
middleware instead of rolling your own end point handlers (without caching) one-by-one)If sending an unmodified file is not what you want, then don't use sendFile
.
Upvotes: 2