Upload
jaehoon-kwak
View
181
Download
0
Embed Size (px)
Citation preview
SOGANG UNIVERSITY COMPUTER SCIENCE & ENGINEER-ING TEAM FULL STACK - KWAKJAEHOON
VER 0.4
Node.js all in one
1. NODE.JS Download & Install Node.js at nodejs.org. Now what? Just do type code and run! (next
page)
2. JUST FOLLOW THIS – HELLO WORLD1. Make .js file (Just type with notepad and store this
with different name that .js)Make it sure that file name can’t be node.js!!(error)
2. Next just type following next paragraphs.
3. How to run? With node.js command prompt!You need file location information to run.
2. JUST FOLLOW THIS – HELLO WORLD Check .js location and approach to this loca-
tion in node.js command prompt.
Now Server is running!! Check it with connecting http://localhost:8000/
2. JUST FOLLOW THIS – HELLO WORLD Fantastic result, very simple and easy!!
Now you can do anything with Googling!!Google is my second brain… (actually first…)
From next slide, introduce my project using node.js
3. LOG SEARCH PROJECT Whole code : www.github.com/kwakjaehoon
First, look into auto.sh file. In this file, commands are listed. You need to in-stall npms, and if you need save those with --save
What is npm?? - npm makes it easy for JavaScript developers to share and reuse code, and it makes it easy to update the code that you're sharing.
3. LOG SEARCH PROJECT
With my code you can get a insight to node.js if you just follow my code from 1 line to end line.
If you have any question in it, just google it!!
4. WEATHER FORECAST PROJECT Source code at https://
github.com/xptr33/CAPSTONE_PRJ2_FORECAST
How we implemented this project using nodejs?
In this project, node.js functions in three ways: Node.js works as a web server using ‘ex-
press’ module. Node.js retrieves necessary weather forecast
data from kma.go.kr using ‘request’ module. Node.js pushes/pulls weather data onto/from
database using ‘mysql’ module.
4. WEATHER FORECAST PROJECT
Web browser(client)
Web server(server on node.js)
MYSQL Database
kma.go.kr(weather service)
Sends weather data to clients
(1) Pushes weather data onto database
Retrieves weather data periodically (approx. 1 hour)
Conceptual View
(2) Pulls weather data from database when there is any request from clients
4. WEATHER FORECAST PROJECT
Web browser(client)
– chart.html
Web server(server on node.js)
MYSQL Database
kma.go.kr(weather service)
server.js – ex-press module collect.js – request, xml
module (xml module re-quired to parse xml-for-mat weather data.)
Technical View
db.js / insert.js – mysql mod-ule
To be filled soon