Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
freon
Advanced tools
Readme
Fast server-side web framework
const Freon = require('freon');
const app = new Freon.Application(['example.com', /.+\.example\.com/]);
app.onGet(/\/.+\.html/, (req, res) => {
// Server code..
});
const Freon = require('freon');
Freon.Application
Plugins are trivial to create for freon. For example, a plugin that injects a property foo
into the request object and sets it to 'bar'
:
// fooBarPlugin.js
module.exports = (req, res, next) => {
req.foo = 'bar';
next();
}
Note that it is vital to call next()
when the plugin is finished loading. If any plugin does not call next()
, then the server will halt when it is requested, waiting for that plugin to load, which it never will.
To load this plugin:
// server.js
const app = new Freon.application(['example.com']);
app.plugin(require('./fooBarPlugin.js'));
Use Freon.static
to serve a static folder. It will be compressed using gzip
and deflate
, send the Last-Modified
header, and send 304
status codes without a body when possible. If the file is not found in the directory, it will then pass on the request to the next handlers.
const app = new Freon.application(['example.com']);
app.plugin(Freon.static('someRandomDir/theDirToServeWebFilesFrom'));
You may find these plugins useful:
Freon will overwrite the request and response object. See the properties and methods that are added:
FAQs
Fast server-side web framework
The npm package freon receives a total of 29 weekly downloads. As such, freon popularity was classified as not popular.
We found that freon demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.