Last active
November 28, 2017 05:38
-
-
Save writingdeveloper/aca21f3edde5b05d375ba99d95d98009 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'); | |
var app = express(); | |
var path = require('path'); | |
app.use(express.static(path.join(__dirname, 'public'))); | |
app.get('/', function(req, res) { | |
res.send('Hello home page'); | |
}); | |
app.get('/route', function(req, res) { | |
res.send('Hello Router, <img src="/image.jpg" style="width:500px; height:500px;">'); | |
}) | |
app.get('/login', function(req, res) { | |
res.send('<h1>Login please</h1>'); | |
}); | |
app.listen(3000, function() { | |
console.log('Conneted 3000 port!'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment