Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@rster/database
Advanced tools
Rster is built to simplify creation of restful backend apis. It is a framework that allows you to build your api in a modular way. It's core framework works quite similar to express, however we provide a few tools like @rster/builder
, @rster/database
to drastically simplify the creation of your api and directly integrate your database. These tools are especially powerful when combined with typescript
as all typings are generated automatically.
Also with @rster/generator
you can generate a typescript client directly from your server-side api definition which saves you a lot of time and nerves.
NOTE: This project is still in early development and features are added frequently. If you have any suggestions or ideas feel free to open an issue or pull request. @rster/generator
and @rster/database
are not available via npm yet. They need to be built from source and are not yet documented or tested enough to be used in production. Feel free to try them out and give feedback. Please have some patience, they take a lot of work to build and test. They will be released soon. Thanks!
Hello and welcome to the rster project. Rster is the easiest way to build your backend api in nodejs. It is a framework that allows you to build your api in a modular way. Just define your library then use your functions to access and modify your data. Or directly add it to the express app using express.use()
. It is up to you. You can even generate a typescript client directly from your server-side api definition!
Let's learn rster rster in less than 5 minutes.
We recommend you to have basic knowledge of the following tools before starting:
npm install rster
alternatively you can use yarn
yarn add rster
Rster packages a few core dependencies that will help you getting started. However we have a few more dependencies that you might want to install. You definitly want to install a worker implementation. A worker implementation is a package that allows you to run your rster application on a webserver so you can access your api from the internet. We recommend using @rster/worker-express as it is the easiest to get started with.
find more worker implementations here
npm install @rster/worker-express
alternatively you can use yarn
yarn add @rster/worker-express
Firstly we want to import the rest function from rster as well as our worker's implementation. (we'll use express in this example)
import { rest } from "rster";
import "@rster/worker-express";
The worker will extend the prototype of our rest api object. Types are automatically extended as well.
Next we can define the pattern of our api. We will create a simple api that returns a string when we call the /hello
endpoint.
const api = rest(function () {
this.get("/hello", function () {
this.action(function (req, res) {
res.status(200).json({ message: "Hello World!" }).end();
});
});
});
NOTE: It is important to use the function()
syntax instead of the arrow function () => {}
as the this
keyword is not bound to the arrow function.
Now we can create a webserver using express and pass our api it using the use
function and the express
worker.
import express from "express";
const app = express();
app.use(api.express());
For more examples, please refer to the Documentation
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
git checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)Distributed under the BSD-3-Clause License. See LICENSE
for more information.
Nicolas Schmidt
Project Link: https://github.com/nsc-de/rster
FAQs
RSTER is a toolset for REST Api creation
We found that @rster/database 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.