How to Use AJAX with Node
Project Structure |-------------- models | |-------------- task.js | |-------------- public | |-------------- data.js | |--------------- routes | |-------------- taskroute.js | |--------------- views | |-------------- demo.ejs | |--------------- app.js Setup The Folder To create a folder, open the command prompt and type cmd mkdir followed by the folder name # mkdir ajax Change to the folder by typing the cmd cd followed by the folder name # cd ajax Setup Node In Folder On the console, type the below command # npm init -y This will create a package.json file, Which means that node is initialised in the folder. the package.json will look like this Install Pack