![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@piigo/expresslib
Advanced tools
A simple yet powerfull Express library to build REST API using Express, MongoDB and Redis.
helmet
to protect your appthrow
and stack.HttpErrorsign
, verify
, and refresh
$ npm install @piigo/expresslib
Create a new file named .env
and then add the following text
mongoUrl=<Your MongoDB connection url, ex: localhost:27017>
redisUrl=<Your redis url under the format host:port, ex: localhost:6379>
redisAuth=<Redis password, ex: qwerty>
appHost=<Address on which the http server will listen, ex: 0.0.0.0>
appPort=<Port on which the http server will listen, ex: 80>
jwtSecretKey=<Secret key to sign your JWT with, should be at least of 256 bits (1 character = 8 bits), ex: qwerty>
jwtExpiresIn=<Amount of time that your JWT will be valid, ex: 10m>
tokensPrefix=<Prefix to use for every apiKey and apiSecret, ex: tokens.>
Note: Currently you can provide environment variables throught a .env
file.
You can still load environment variables in other way but don't forget to always have at least an empty .env file, otherwise application will crash.
A better support for environment variables will be provided in the near future, but pull request are always welcome.
const stack = require("@piigo/expresslib");
const middlewares = stack.middlewares;
const schema = {
$schema: "http://json-schema.org/draft-07/schema",
type: "string",
}
const router = stack.router();
router.get("/", (req, res) => res.send("Hello world!"));
router.get("/needApiKey", middlewares.apiKey, (req, res) => res.send("Access authorized " + req.appId));
router.get("/needApiSecret", middlewares.apiSecret, (req, res) => res.send("Access authorized " + req.appId));
router.post("/mustFollowSchema", middlewares.validateBody(schema), (req, res) => res.send("Schema is valid"));
router.get("/error", (req, res) => {throw new stack.HttpError("cancelled", "It works")});
stack.use(router);
stack.start();
FAQs
Library to manage express
The npm package @piigo/expresslib receives a total of 1 weekly downloads. As such, @piigo/expresslib popularity was classified as not popular.
We found that @piigo/expresslib 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
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.