-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathindex.js
More file actions
20 lines (17 loc) · 741 Bytes
/
index.js
File metadata and controls
20 lines (17 loc) · 741 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* eslint-disable no-var, vars-on-top, no-console */
// Register babel to have ES6 support on the server
require( 'babel-core/register' )({
ignore: /node_modules/,
presets: [ 'es2015', 'stage-0', 'react' ],
plugins: [ 'transform-decorators-legacy', 'transform-runtime' ]
});
const chalk = require( 'chalk' );
require('./src/globals');
global.__SERVER__ = true;
const enviroment = __DEVELOPMENT__ ? 'Development' : 'Production';
const server = require( './src/server' ).default;
server( server => {
for ( var key of Object.keys(server.connections) ) {
console.info( chalk.bold.green( '==> 🌎 Hapi ' + enviroment + ' Server (' + server.connections[key].name + ') is listening on', server.connections[key].info.uri ));
}
});