New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

vbel2

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vbel2 - npm Package Compare versions

Comparing version 0.0.2 to 0.2.1

LICENSE

6

package.json
{
"name": "vbel2",
"version": "0.0.2",
"version": "0.2.1",
"description": "An opiniated back-end framework",

@@ -9,2 +9,3 @@ "main": "index.js",

},
"repository": "vanyle/vbel2",
"keywords": [

@@ -19,2 +20,5 @@ "back-end",

],
"engines": {
"node": ">= 0.10.0"
},
"author": "vanyle",

@@ -21,0 +25,0 @@ "license": "MIT",

# VBel2
VBel2 helps you quickly build complex APIs that easily integrate with your frontend.
VBel2 helps you quickly build complex APIs that easily integrate with your frontend / existing backend.
Think of it as Django but in Javascript, more lightweight and API focused.
## Getting Started
Use the following command
```bash
npm install vbel2
```
Minimal example:
```js
const VBel = require('vbel2');
const http = require('http');
let vbel = new VBel();
// Define endpoints
vbel.endpoint("hello", {name:{"type":"string"}}, (obj,req,res) => {
vbel.sendSuccess(`Hello ${obj.name}`);
});
vbel.endpoint("bye", {name:{"type":"string"}}, (obj,req,res) => {
vbel.sendSuccess(`Goodbye ${obj.name}`);
});
vbel.compile(); // call compile before use
let server = http.createServer({},vbel);
server.listen(8080,() => {
console.log("http://localhost:8080")
});
```
## Overview
VBel2 stands for Vanyle's BackEnd Library 2. It is a framework to build backends in NodeJS. VBel2 allows you to quickly build complex websites with minimal effort for your backend.
VBel2 stands for Vanyle's BackEnd Library 2. It is a framework to build backends in Node.js. VBel2 allows you to quickly build complex websites with minimal effort for your backend.

@@ -28,3 +66,3 @@ Most website are just an interface between a user and a database. The only job of the backend is to make sure that the users have proper authorizations to read or edit the database. It's from this observation that VBel2 was built.

Let's say you have a nodejs application built with express and you want to add a new endpoint.
Let's say you have a node.js application built with express and you want to add a new endpoint.
For example, an endpoint that returns a random number from the server.

@@ -49,3 +87,3 @@

let nbr = Math.random() * (obj.max - obj.min) + obj.min;
vbel.sendResult(res,nbr);
vbel.sendSuccess(res,nbr);
}

@@ -52,0 +90,0 @@ );

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc