Skip to content

Instantly share code, notes, and snippets.

@alexeybondarenko
Last active August 8, 2017 20:23
Show Gist options
  • Save alexeybondarenko/4e735756b2b6311193e101c8567f7c35 to your computer and use it in GitHub Desktop.
Save alexeybondarenko/4e735756b2b6311193e101c8567f7c35 to your computer and use it in GitHub Desktop.
Tutorial. How to create MIDI synthesizer with MIDI API and Node JS
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