Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@fusengine/berserk-engine

Package Overview
Dependencies
Maintainers
1
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fusengine/berserk-engine - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

lib/express/Header.js

10

config.js
module.exports = {
PORT: '',
port: '',
/** Define Header Request */
header: {
origine: '*',
headers: 'Origin, X-Requested-With, Content-Type, Accept, token-berserk',
method: 'PUT, POST, GET, DELETE, OPTIONS',
credentials: true,
},
}

6

index.js

@@ -8,7 +8,7 @@ /*!

// const path = require('path')
// const pathBerserk = path.resolve(__dirname, 'config.js')
const path = require('path')
const pathBerserk = path.resolve(__dirname, 'config.js')
module.exports = {
engine: require('./lib'),
engine: require('./lib')(pathBerserk),
}
module.exports = {
/** Port file */
Port: require('./Port'),
Header: require('./Header'),
}
const colors = require('colors')
const logSymbols = require('log-symbols')
module.exports = berserkEngine = pathPort => {
/** Express Module */
const { Port, Header } = require('./express')
/**
* berserkEngine
* @param {String} configPath link to config if you want custom your configuration
*/
const berserkEngine = configPath => {
console.log(colors.blue.bold(`${logSymbols.success} Express: Loaded`))
if (pathPort) {
const { PORT } = require(`${pathPort}`)
if (PORT) {
require('./express/index').Port(PORT)
} else {
require('./express/index').Port()
}
if (configPath) {
/** got read file to config path */
const { port, header } = require(`${configPath}`)
/** view array header config */
if (header) headerObj = Object.values(header)
/** Header Request*/
header ? Header(...headerObj) : Header()
/** Port App*/
port ? Port(port) : Port()
} else {
require('./express/index').Port()
Header()
Port()
}
}
module.exports = berserkEngine

@@ -18,2 +18,16 @@ /**

portFunction: value => process.env.PORT || value,
/**
* header express
* @param {String} origine origine request
* @param {String} headers header request
* @param {String} method method to put post get delete options
* @param {Boolean} credentials true and false
*/
header: {
origine: '*',
headers: 'Origin, X-Requested-With, Content-Type, Accept, token',
method: 'PUT, POST, GET, DELETE, OPTIONS',
credentials: true,
},
}
{
"name": "@fusengine/berserk-engine",
"version": "1.0.1",
"version": "1.0.2",
"description": "Berserk engine run start application",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -1,3 +0,3 @@

![alt Berserk](./logo.png "Berserk Engine")
![alt Berserk](https://cdn.fusengine.ch/logo/berserk.png "Berserk Engine")
Berserk-engine use [express](https://github.com/expressjs/express) to create simple framework.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc