npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

lesrobertsframework

v0.1.8

Published

This is a [Node.js](https://nodejs.org/en/) module available through the [npm registry](https://www.npmjs.com/).

Readme

Installation

This is a Node.js module available through the npm registry.

Before installing, download and install Node.js. Node.js 0.10 or higher is required.

Installation is done using the npm install command:

$ npm install -g lesrobertsframework

Quick Start

Install the executable:

$ npm install -g lesrobertsframework

Create the app:

$ roberts init|i

Create new model (go in the previously created project)):

$ roberts model:create|m:c

Install dependencies:

$ npm install

Configure your project ...

Start the server:

$ roberts start

Access swagger on : host/api-doc#/

Project structure

myProject_orm
    │   main.ts
    │   package-lock.json
    │   package.json
    │   README.md
    │   tsconfig.json
    │
    ├───config
    │       datasource.ts
    │       server-config.ts
    │       swagger-config.ts
    │
    ├───models
    │       FooModel.ts
    │
    └───route
            router-Foo.ts
            router.ts

Configuration example

serveur-config.ts

import { ServerConfig } from 'lesrobertsframeWork'; // Importing the interface from the frameWork

const serverConfig: ServerConfig = {
    id: 1,
    name: "serverConfig",
    port: 3001,
}

export default serverConfig;

datasource.ts

export const dataSourceRest = new DataSource( 
    RestAdapter,
    1,
    "datasource1",
    { 
        restBaseUrl:  'http://localhost:3000'
    }
);

export const dataSourceSql = new DataSource( 
    SqlAdapter,
    1,
    "dataSource2",
    { 
        host : "db347118-robert.sql-pro.online.net",
        user: "db114324",
        password: "Azerty123",
        database: "db347118_robert"
        
    }
);

swagger-config.ts

const options = {
    swaggerDefinition: {
        info: {
            description: 'This is a sample server',
            title: 'Swagger',
            version: '1.0.0',
        },
        host: 'localhost:3001',
        basePath: '',
        produces: [
            "application/json",
            "application/xml"
        ],
        schemes: ['http', 'https'],
        securityDefinitions: {
            JWT: {
                type: 'apiKey',
                in: 'header',
                name: 'Authorization',
                description: "",
            }
        }
    },
    basedir: __dirname, //app absolute path
    files: ['../route/router*.ts'] //Path to the API handle folder
};

export default options;

Customisation

This module has some automaticaly generated route and adapter. You can add your own :

My custom adapter :

import Foo from '../model/foo'
import fetch from 'node-fetch';

// Test de la création d'une requête pour un utilisateur de notre framework
export default class Test {
  public static async findById() : Promise<User> {
  	const url = `http://localhost:3000/foo/1`;
  	const promiseModel = await fetch(url).then(
  		async (res: any) => {
  			const model = new User(await res.json());
  			return model;
  		},
  	);
  	return promiseModel;
  }
}

Modify your model :

import { Model } from 'lesrobertsframeWork'; 
import DataSource from '../config/datasources';
import { endPoint } from './restConfig/foo-restConfig';
import Test from '../testAdapter/testFindFooById';

class Foo extends Model {
    static dataSource = DataSource;
    static restConfig = {
        endpoint: endPoint,
    }

    constructor(data: Record<string, any>) {
        super(data);
    }

    public static testGet() {
        return Test.findById();
    }
}

export default Foo;

my custom route :

router.get('/id/:id', async function(req, res, next) {
  try {
    res.send(await Foo.testGet());
  } catch(err) {
    next(err)
  }
});

License

MIT