Last active
August 8, 2017 20:23
-
-
Save alexeybondarenko/4e735756b2b6311193e101c8567f7c35 to your computer and use it in GitHub Desktop.
Tutorial. How to create MIDI synthesizer with MIDI API and Node JS
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
const Express = require('express'); | |
const ejs = require('ejs'); | |
const path = require('path'); | |
const app = new Express(); | |
app.set('PORT', process.env.PORT || 3000); | |
app.set('view engine', 'ejs'); | |
app.set('views', path.join(__dirname, './views')); | |
app.get('/', (request, response) => { | |
response.render('index'); | |
}); | |
app.listen(app.get('PORT'), (error) => { | |
if (error) { | |
console.log('Server started with an error', error); | |
process.exit(1); | |
} | |
console.log(`Server started and is listening at http://localhost:${app.get('PORT')}`); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment