Mykhailo Behei
var express = require('express') var app = express()
app.get('/', function (req, res) { res.send('<form action="/something"><input type="submit" name="something" value="something"/></form>') })
app.get ('/something', function (req, res) { res.send('<h1>something handled.</h1>') })
app.listen(8888, function() { console.log('Server.up!') })(Edited: 2017-05-03)
res.send('<form action="./something"><input type = "submit" name = "something" value = "something"></input></form>');})
res.send('<h1>We have handled something.</h1>')})
console.log('Listening on the report')})
var express= require('express') var app= express()
app.get('/', function (request, response) { response.send('<form action= "./something"><input type= "submit" name="something" value="something"></form>') })
app.get('/something', function(request, response) { response.send('<h1> Something handled! </h1>') })
app.listen(8888,function(){ console.log("Server is up!") })
var express = require('express') var app = express() // can add different routes app.get('/', function (req, res) { res.send('<form method="post" action="/something"><input type="submit" value="something"></input></form>') }) app.get('/something', function (req, res) { res.send('<h1>Something handled</h1>') }) app.listen(8888, function () { console.log('Server up') })
res.send('<form action="/something" id="form"> <button type ="submit" form="form" value="something"> Something</button></form>' )}) app.get('/something', function(req, res){
res.send('<h1> In Class 5/3 </h1> <p> your something form has been sent here</p>')}) app.listen(8888, function () {
console.log('Server up!')})
Name: Luis Otero
var express = require('express'); var app = express();
app.use('/', express.static(__dirname)) app.get('/', function(req, res) { res.send('<form action="/something" method="post"><input type="submit" name="something" value="something" /></form>') })
app.post('/something', function (req, res) { res.send('<h1>Something handled</h1>') })
app.listen(8888, function() { console.log('Server up') })
var express = require('express') var app = express() app.get('/', function (req, res) { res.send('<form action="/something"><input type="submit" name="something" value="something"></form>') }) app.get('/something', function (req, res) { res.send('<h1>Something handled.</h1>') }) app.listen(8888, function () { console.log('Server Up!') })
res.send('<form action="/something"><input type="submit" name="something" value="something"/> </form>')})
res.send('<h1> Something handled. </h1>');})
console.log('Server up!')})
var express = require('express') var app = express() // routes from last day app.get('/', function (req, res) { res.send('<form method="POST" action="/something"><input type="submit" name="something" value="something"/> </form>') }) app.get('/something', function (req, res) { res.send('<h1>Something Handled</h1>') }) app.listen(8888, function () { console.log('Server up!') })(Edited: 2017-05-03)
res.send('<form method="post" action="/test"><input type="submit" name="test" value="test"></form>')})
res.send('<h1>May 3 Exercise</h1>')})
console.log('Works!')})