
Research
/Security News
Contagious Interview Campaign Escalates With 67 Malicious npm Packages and New Malware Loader
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
@triptyk/jsonapi-server
Advanced tools
A development server with an in-memory database supporting json-api specification.
Still WIP.
You can provide json models that will be be automatically loaded into the fake database
{
"projects": [
{
"id": "1",
"title": "Project One",
"details": "This is a sample project",
"percentComplete": 20,
"approved": false,
"startDate": null,
"targetDate": null,
"completionDate": null,
"customers#creator": "1",
"customers#customers": [
"1",
"2"
]
},
{
"id": "2",
"title": "Project Two",
"details": "This is a sample project",
"percentComplete": 40,
"approved": false,
"startDate": null,
"targetDate": null,
"completionDate": null,
"customers#creator": "2",
"customers#customers": [
"1",
"2"
]
},
{
"id": "3",
"title": "Project Three",
"details": "This is a sample project",
"percentComplete": 60,
"approved": false,
"startDate": null,
"targetDate": null,
"completionDate": null,
"customers#creator": "3",
"customers#customers": [
"1",
"2"
]
}
]
}
Relations are recognized this way : "<entityType>#<relationName>": "<id>",
"customers#creator": "3",
The id can also be an array of ids :
"customers#creators": ["3","2","1"],
:note: : the IDs MUST exist otherwise it will throw errors on startup
"customers#creators": ["3","1"]
if your relation is in a projects.json file , customers will create a projectsCreators relationship on the projects entity side.
includes (1 level)
pagination
sorting
sparse fieldsets
filters
creating entity
updating entity
deleting entity
You can create a configuration file in config/configuration.json with these values , it will override the default configuration
{
"pluralizeSerializers": false,
"authEntity": "users",
"convertCase": "kebab-case",
"unconvertCase": "kebab-case",
"port":8000,
"jwtAuthKey":"patate",
"jwtExpiration":2
}
import { JsonApiServer, Configuration } from "@triptyk/jsonapi-server";
import { Request, Response, NextFunction } from "express";
const server = new JsonApiServer();
server.Router.use((req,res,next) => {
console.log("Hello");
next();
});
server.Router.route("/status")
.get((req: Request,res: Response,next: NextFunction) => {
res.sendStatus(200);
});
server.register("data/projects.json");
server.register("data/customers.json");
server.register("data/users.json");
server.setupServer().then((app) => {
app.listen(Configuration.configuration.port,() => {
console.log(`Mockup server running on port ${Configuration.configuration.port}`);
});
});
FAQs
A json mockup server for multiple front-end
The npm package @triptyk/jsonapi-server receives a total of 1 weekly downloads. As such, @triptyk/jsonapi-server popularity was classified as not popular.
We found that @triptyk/jsonapi-server demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.