Security News
npm Updates Search Experience with New Objective Sorting Options
npm has a revamped search experience with new, more transparent sorting options—Relevance, Downloads, Dependents, and Publish Date.
tcpress-rs
Advanced tools
A web framework written in Rust for javascript runtime.
npm install tcpress-rs
or
yarn add tcpress-rs
import { TCPress, Response, Request } from 'tcpress-rs';
import net from 'net'
const port = 7070;
const host = '0.0.0.0';
let app = new TCPress();
let sleep = (ms: number) => new Promise(resolve => setTimeout(resolve, ms));
// app
app.get("/", [async (req: Request, res: Response, next: Function)=>{
req.set("test", "app state 1");
res.header("Powered-By", "TCPress")
// await sleep(100);
next();
}, async (req: Request, res: Response)=>{
console.log("state test", req.get("test"));
// console.log("headers", req.headers());
// console.log("raw_body", req.body().raw_body());
res.status(200).json({
status: 200,
message: "Hello World",
});
}])
// uncaughtException
process.on('uncaughtException', function (err) {
console.log(err);
});
// Tcpress + NodejsTCP
const server = net.createServer();
function sv(){
server.listen(port, host, () => {
console.log('TCP Server is running on port ' + port +'.');
});
let tc = 0
server.on('connection', (sock) => {
sock.on('data', (data) => {
tc++
let tm_lable = `lap_${tc}`
console.time(tm_lable)
app.http(data, (res: string)=>{
sock.write(res);
console.timeEnd(tm_lable)
})
});
});
}
sv();
FAQs
A web framework written in Rust for javascript runtime.
The npm package tcpress-rs receives a total of 4 weekly downloads. As such, tcpress-rs popularity was classified as not popular.
We found that tcpress-rs 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
npm has a revamped search experience with new, more transparent sorting options—Relevance, Downloads, Dependents, and Publish Date.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.