
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@colucom/osseus-module-wrapper
Advanced tools
Wrapper for osseus modules to be used without the osseus infrastructure
$ npm install @colucom/osseus-module-wrapper
For each module you want to use see relevant Usage section
In order to use any one of those modules you should install it on your app
Let's say we want to use osseus-logger
and osseus-server
in our small project.
First, create index.js
:
const wrapper = require('osseus-module-wrapper')
const main = () => {
wrapper.init(['logger', 'server'], (err, modules) => {
if (err) {
console.error(err)
return process.exit(1)
}
console.log('modules', Object.keys(modules))
// this is how to use the "server" module
modules.server.app.use('/hello', (req, res, next) => {
return res.send('world')
})
// this is how to use the "logger" module
modules.logger.info('done')
})
}
main()
init
function receives two parameters:osseus
modules without the osseus-
prefix, which you wish to usemodules
Running:
$ node index.js --OSSEUS_SERVER_PORT 8888 --OSSEUS_SERVER_DEPENDENCIES ["'logger'"] --OSSEUS_LOGGER_LOG_LEVEL debug
Will result in:
2018-07-09T13:33:17.362Z - info: (Liors-MacBook-Pro.local) (32802) - server is listening on port: 8888
2018-07-09T13:33:17.363Z - debug: (Liors-MacBook-Pro.local) (32802) - modules
["config","logger","server"]
2018-07-09T13:33:17.363Z - info: (Liors-MacBook-Pro.local) (32802) - done
And, sending GET request localhost:8888/hello
will result in the response: world
Please see contributing guidelines.
Code released under the MIT License.
FAQs
Osseus module wrapper
The npm package @colucom/osseus-module-wrapper receives a total of 1 weekly downloads. As such, @colucom/osseus-module-wrapper popularity was classified as not popular.
We found that @colucom/osseus-module-wrapper demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.