Created
September 5, 2017 06:43
-
-
Save israeleriston/3c77593c6c1a125ad1481b646643971d to your computer and use it in GitHub Desktop.
Importação node
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
// ref /src/plugins/index.js | |
const router = require('./router') | |
const cors = require('./cors') | |
console.log(' ta vindo aqui os plugisn ? ' + JSON.stringify(router)) | |
const plugins = [ router, cors ] | |
module.exports = plugins | |
// ref /src/config/server.js | |
// os plugins sempre vem undefined, what? | |
const hapi = require('hapi') | |
const registerPlugins = require('../helps/register/plugins') | |
const plugins = require('../plugins/index') | |
const server = new hapi.Server() | |
server.connection({ port: 8080, host: 'localhost' }) | |
console.log(' plugins no server ' + JSON.stringify(plugins)) | |
registerPlugins(server, plugins) | |
module.exports = server |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment