Modernize and remove accidental commits (#84)

main
Hunter Loftis 7 years ago committed by Jeremy Morrell
parent 182236754e
commit 787a0397af

@ -1 +1 @@
web: node --debug=5858 index.js
web: node index.js

@ -1,18 +1,10 @@
var express = require('express');
var app = express();
app.set('port', (process.env.PORT || 5000));
app.use(express.static(__dirname + '/public'));
// views is directory for all template files
app.set('views', __dirname + '/views');
app.set('view engine', 'ejs');
app.get('/', function(request, response) {
response.render('pages/index');
});
app.listen(app.get('port'), function() {
console.log('Node app is running on port', app.get('port'));
});
const express = require('express')
const path = require('path')
const PORT = process.env.PORT || 5000
express()
.use(express.static(path.join(__dirname, 'public')))
.set('views', path.join(__dirname, 'views'))
.set('view engine', 'ejs')
.get('/', (req, res) => res.render('pages/index'))
.listen(PORT, () => console.log(`Listening on ${ PORT }`))

@ -1,9 +1,9 @@
{
"name": "node-js-getting-started",
"version": "0.2.6",
"version": "0.3.0",
"description": "A sample Node.js app using Express 4",
"engines": {
"node": "6.11.1"
"node": "8.9.1"
},
"main": "index.js",
"scripts": {
@ -11,8 +11,8 @@
"test": "node test.js"
},
"dependencies": {
"ejs": "2.5.6",
"express": "4.15.2"
"ejs": "^2.5.6",
"express": "^4.15.2"
},
"devDependencies": {
"request": "^2.81.0",

@ -13,7 +13,7 @@
<a href="/" class="lang-logo">
<img src="/lang-logo.png">
</a>
<h1>Getting Started with Node on Heroku v1.0 dev branch</h1>
<h1>Getting Started with Node on Heroku</h1>
<p>This is a sample Node application deployed to Heroku. It's a reasonably simple app - but a good foundation for understanding how to get the most out of the Heroku platform.</p>
<a type="button" class="btn btn-lg btn-default" href="https://devcenter.heroku.com/articles/getting-started-with-nodejs"><span class="glyphicon glyphicon-flash"></span> Getting Started with Node</a>
<a type="button" class="btn btn-lg btn-primary" href="https://github.com/heroku/node-js-getting-started"><span class="glyphicon glyphicon-download"></span> Source on GitHub</a>

Loading…
Cancel
Save