2016-10-10 18:37:26 +03:00
|
|
|
const express = require('express');
|
|
|
|
|
|
|
|
const app = express();
|
|
|
|
|
2016-10-20 04:14:26 +03:00
|
|
|
app.use('/graphql', require('./endpoint'));
|
2016-10-10 18:37:26 +03:00
|
|
|
|
2017-04-27 21:26:15 +03:00
|
|
|
const server = app.listen(4000, err => {
|
2016-10-10 18:37:26 +03:00
|
|
|
if (err) {
|
2017-04-27 21:26:15 +03:00
|
|
|
console.error(err);
|
2016-10-10 18:37:26 +03:00
|
|
|
throw err;
|
|
|
|
}
|
|
|
|
|
2017-04-27 21:26:15 +03:00
|
|
|
console.log(`Listening at http://0.0.0.0:${server.address().port}/graphql`);
|
2016-10-10 18:37:26 +03:00
|
|
|
});
|