Node.js devel
Pages
(Move to ...)
Tutorials
About me
Donations
Drupal/Wordpress
▼
Thursday, May 24, 2018
Create a simple messages service (part 4)
›
1- To solve for the undefined message in the console, we need to install a body parser app. So, in console, type npm install -s body-pars...
Tuesday, May 22, 2018
Create a simple messages service (part 3: testing the POST service via Postman app)
›
1- We begin by making sure our post function is working properly. To do this, we add a post function below our get function from our "e...
Wednesday, May 16, 2018
Create a simple messages service (part 2)
›
1- You can use app.get() to to show custom results to specific urls. For testing purposes, add the following inside the server.js file, afte...
Create a simple messages service (part 1)
›
1- Install node and express dependencies npm init --yes npm install -s express 2- Create express lib and app variables var expres...
Wednesday, May 9, 2018
How to setup express.js and execute server to display static content
›
1- Create a server.js file 2- In console, install node npm init --yes 3- In console, install express framework npm install -s express w...
Monday, May 7, 2018
How to write to a json file
›
1- Call the filesystem var fs = require('fs') 2- Define the object to be added to the JSON file var data = { name: "raf...
Friday, April 27, 2018
How to read directories
›
1- Invoke the filesystem var fs = require('fs') 2- Use the function readdir() from the fs variable fs.readdir('c:/', (...
›
Home
View web version