Berserk-engine use express to create simple framework.
engine()
To use berserk-engine use engine()
which will contain the functions to read the configuration files, routes and your module array customize for your own application.
Exemple
const berserkEngine = require('@fusengine/berserk-engine')
const {engine} = require('@fusengine/berserk-engine')
engine(
)
berserkUtils()
use customized console.log()
.
infoMessage('my message' or my var) Define info messages
successMessage('my message' or my var) Define success messages
errorMessage('my message' or my var) Define error messages
Exemple
const berserkEngine = require('@fusengine/berserk-engine')
const {
infoMessage,
successMessage,
errorMessage
} = require('@fusengine/berserk-engine')
infoMessage(myVar or 'my message')
successMessage(myVar or 'my message')
errorMessage(myVar or 'my message')
Exemple
const {engine} = require('@fusengine/berserk-engine')
const myConfig = require('./myConfig')
const myModule1 = require('./myModule')
const myModule2 = require('./myModule')
engine(
myConfig,
'Api',
'Web',
[
myModule1,
myModule2
]
)
engine(configFile, apiFile, webFile, [array require('')] )
If you want use berserk framework.