To run Node.js

What is Node.js?

Node.js is a JavaScript application for running on the PC, not the browser. Software. You can't use obniz unless you have that page open when you run it in a browser, whereas Node .js allows you to run it on your computer or server all the time, so you can use it every hour. You can easily do things like save the temperature to Dropbox. Furthermore, there are plenty of libraries built for Node.js, so it's easy to create a variety of software. It is.


  • Because it runs on a PC or server, the program can run constantly.
  • You can do a lot of things with the Node.js library.

Install Nodejs

If you're new to Nodejs, the first step is to install Nodejs!

You can download it from this site.

Create Nodejs Project

Let's create a Node.js project.
The only thing you need to do is create a folder and put one or two files inside it. First, you need to create a folder, which can be any name. The name can be anything, and if you're on Windows, you can use the command line. Then you create the folder from the command line on Windows, or from the shell on Mac or Linux. into

npm init

and command. You will be asked for various questions, but press Enter and proceed for now. Then there is a package.json in this empty folder.
This is the file of the project.

Next, we need to prepare app.js to write the app. Prepare an empty text file, name it app.js and save it in this folder . Your project is now complete!

Install obniz.js

Next, install obniz from npm.
The browser used to use "