
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
A CLI and framework called JumboJS. This package optimize time of creating express api core and middleware routes.
$ npm i -g jumbojs
To create a new jumbo app type:
$ jumbo new <appName> <appType> <appPort>
App type is the type of aplication api or mvc, type 'mvc' to create a model view controller app or type 'api' to create a micro-service.
The default app port is 8000.
To start your app type:
$ cd <appName>
$ npm install
$ npm start
And check in your browser "http://localhost:appPort/api".
To create view in project type:
$ jumbo view <viewName>
and apply in your app.js to use views, like:
const init = require('./mvc')(app);
app.get('/', function (req, res) {
res.render('index', { title: 'My jumbo pug page' });
});
and try this path "http://localhost:appPort/" without api endpoint.
To create new route in your app, you must to enter in app folder and type:
$ jumbo route <routeName>
And your route as created in "./src/routes/.js".
Creating a mysql connection, making a query and close connection.
const { databases } = require('jumbojs/framework');
const { mysql } = databases;
// instancing a connection
const conn = mysql.createConnection({
host: 'localhost',
user: 'root',
password: '',
database: 'myDatabaseName'
});
module.exports = {
mysql: mysql,
conn: conn
}
or use CLI to make this file for your
$ jumbo database mysql
now configure your options in createConnection method and make your model
const { mysql, conn } = require('./mysql.conn.js');
// making a query
mysql.query(conn, 'SELECT * FROM users', (res) => {
return console.log(res);
});
// clossing connection
mysql.close(conn);
Using firebase driver, create new project and get web sdk in Firebase Console.
const { databases } = require('jumbojs/framework');
const { firebase } = databases;
const {
fb,
initiliaze,
get,
set,
remove
} = firebase;
// your firebase sdk config object
const myFireBaseSDK = require('./myFireBaseSDKFile');
// init your firebase app
const fbInit = initialize(fb, myFireBaseSDK);
// set data in your real-time database
set(fb, '/users', {
1: {
name: 'foo'
}
});
// get your real-time database data
get(fb, '/users', users => {
return console.log(users);
/*
{
1: {
name: 'foo'
}
}
*/
});
// remove data from real-time database
remove(fb, '/users');
When you have create a model to use your database, try to create a controller.
$ jumbo controller <controllerName>
Set your controller name equals they model name, for User controller type user and the CLI make the first letter uppercase in the file.
This file is created in './src/controllers' folder.
THIS FILE IS A JAVASCRIPT CLASS "OBJECT"
How to get data timestamp???
const { utils } = require('jumbojs/framework');
const { now } = utils;
console.log(now());
/*
returns a object
{
day,
month,
year,
time: this string contains hour:mins:secs
}
*/
Make a request for another url.
const { utils } = require('jumbojs/framework');
const { request } = utils;
// get request
request({
method: 'get',
baseUrl: 'https://some-domain.com/api',
url: '/users'
}, response => {
console.log(response);
});
// post request
request({
method: 'post',
baseUrl: 'https://some-domain.com/api',
url: '/user/create',
data: {
name: 'Otter',
foo: 'JumboJS'
}
}, response => {
console.log(response);
});
MIT - see LICENSE
FAQs
JumboJS CLI and framework
The npm package jumbojs receives a total of 5 weekly downloads. As such, jumbojs popularity was classified as not popular.
We found that jumbojs 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
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.