Friday, 5 January 2018

How to connect file uploaded from HTML input and Node/Express JS?

In my terminal I am running $node index.js where i have a directory called public that has a index.html and style.css.my index.js file:var express = require('express'); var path = require("path"); var app = express(); app.use(express.static("public")); app.listen(3000); my index.html file:
At this point the index.html appears and i can "upload" a file, but I don't know how to access it in my index.js file.

Submitted January 05, 2018 at 08:28AM by GoodChanceImStoned

No comments:

Post a Comment