Nutritious Polygonal Meatball
    Have ideas to improve npm?Join in the discussion! »

    sutro
    TypeScript icon, indicating that this package has built-in type declarations

    7.2.1 • Public • Published

    Build next-generation realtime APIs simply and easily

    Install

    One command and you're ready to make some killer APIs:

    npm install sutro --save
    

    Now, check out the documentation to get started!

    Examples

    10-LOC ES7 API

    const api = {
      user: {
        create: async ({ data }) => User.create(data),
        find: async ({ options }) => User.findAll(options),
        findById: async ({ userId }) => User.findById(userId),
        updateById: async ({ userId, data }) => User.updateById(userId, data),
        replaceById: async ({ userId, data }) => User.replaceById(userId, data),
        deleteById: async ({ userId }) => User.deleteById(userId)
      }
    }

    Yields:

    GET /swagger.json
    GET /users
    POST /users
    GET /users/:userId
    PATCH /users/:userId
    PUT /users/:userId
    DELETE /users/:userId
    

    Install

    npm i sutro

    DownloadsWeekly Downloads

    418

    Version

    7.2.1

    License

    MIT

    Unpacked Size

    60.7 kB

    Total Files

    39

    Last publish

    Collaborators

    • avatar