Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
@colucom/osseus-server
Advanced tools
express based osseus web server module
$ npm install @colucom/osseus-server
To use the moleculer-web api gateway module as a middleware of the express, this configuration are mandatory.
OSSEUS_MOLECULERWEB_LOAD: false
OSSEUS_SERVER_SHOULD_USE_MOLECULER_WEB_AS_MIDDLEWARE: true
Logging
To use custom logging as a middleware of the express, it's necessary to config this 2 configurations.
OSSEUS_SERVER_SHOULD_USE_CUSTOM_LOGGING_METHOD: true
OSSEUS_SERVER_CUSTOM_LOGGING_METHOD_PATH: 'Custom Path'
Custom middlewares
To use custom middelwares you should provide path to array of middleware functions.
OSSEUS_SERVER_MIDDLEWARES_PATH: 'Custom Path'
Errors Map json
To use custom errors map json you should provide path to this json.
OSSEUS_SERVER_ERRORS_MAP_PATH: 'Custom Path'
Handle 404 Errors - Redirect the request to another server
If you wish to redirect the request to another server when 404 not found error occures you should provide base url of this server.
REDIRECT_BASE_URL: 'Custom URL'
Mandatory:
OSSEUS_SERVER_PORT
Optional:
OSSEUS_SERVER_REQUEST_ID_HEADER
OSSEUS_SERVER_MAINTENANCE_ENABLED
true
to enable maintenance mode on serverOSSEUS_SERVER_MAINTENANCE_MESSAGE
OSSEUS_SERVER_MAINTENANCE_OVERRIDE_HEADER
OSSEUS_SERVER_ALLOWED_IP
OSSEUS_SERVER_COMPRESION_ENABLED
true
to enable compression middlewareOSSEUS_SERVER_COMPRESSION_LEVEL
OSSEUS_SERVER_NO_COMPRESSION_HEADER
OSSEUS_SERVER_MORGAN_FORMAT
OSSEUS_SERVER_CORS_WHITELIST
OSSEUS_SERVER_STATIC_ENGINE_TYPE
OSSEUS_SERVER_VIEWS_FOLDER
OSSEUS_SERVER_STATIC_FOLDER
OSSEUS_SERVER_ADD_HEALTHCHECK
/healthcheck
endpoint which returns OK
with status code 200OSSEUS_SERVER_ADD_IS_RUNNING
/is_running
endpoint which returns OK
with status code 200First, create index.js
:
const Osseus = require('osseus')
const main = async () => {
try {
// init osseus
const osseus = await Osseus.init()
} catch (err) {
console.error(err)
}
}
main()
Running:
$ node index.js --OSSEUS_SERVER_PORT 8080
Will result in:
server is listening on port: 8080
Please see contributing guidelines.
Code released under the MIT License.
FAQs
Osseus server
The npm package @colucom/osseus-server receives a total of 6 weekly downloads. As such, @colucom/osseus-server popularity was classified as not popular.
We found that @colucom/osseus-server demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.