Skip to content

andykuang1/nodejs

Repository files navigation

nodejs

Learning node.js through w3schools

myfirst.js | demo_module.js | demo_url.js | demo_query.js | demo_readfile.js

In command line, run

node [filename]

to setup computer as a server, which can then be accessed on the web browser with http://localhost:8080/

For url, we can add any url to have the server print out the accessed url. For query, we see that we can add variables through the use of '?' and variable queries like 'year=2017' An example access would be

http://localhost:8080/?year=2017&month=July

which would print out 2017 July, since our query script prints out the year and month requested.

createfile.js | manipulatefile.js | deletefile.js

Running

node [filename]

runs the script to perform an action. Createfile makes a text file. Manipulatefile opens, writes to and reads from a file. Deletefile deletes a file.

About

Learning node.js through w3schools

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published