1
0
This commit is contained in:
Jason Williams 2019-09-29 18:31:36 -06:00
parent 250110bdb8
commit 2a8bb440df

View File

@ -1,21 +1,28 @@
const express = require('express')
const app = express()
app.get('', (req, res) => {
res.send('Hello express!')
res.send('<h1>Weather</h1>')
})
app.get('/help', (req, res) => {
res.send('Help page')
res.send([{
name: 'Jason',
age: 38
}, {
name: 'Sarah'
}])
})
app.get('/about', (req, res) => {
res.send('About')
res.send('<h1>About</h1>')
})
app.get('/weather', (req, res) => {
res.send('Your weather')
res.send({
location: 'Calgary',
forecast: 'It\'s snowing. It\'s really gross out.'
})
})
app.listen(4200, () => {