Restgoose

Model-driven REST API framework using decorators

MongoDB + Typegoose + Restgoose = ❤️️

Restgoose exposes your MongoDB database through a REST API with ease. It is driven by the model itself, which reduces the boilerplate code necessary to write simple endpoints. It is open for extension, so you can add complex logic easily too.

Installation & basic usage

npm install @xureilab/restgoose
@rest({
    route: '/todos',
    methods: [
        all(), // GET /todos
        one(), // GET /todos/:id
        create(), // POST /todos
        update(), // PATCH /todos/:id
        remove(), // DELETE /todos/:id
    ],
})
export class Todo extends Typegoose {
    /* ... */
}

Documentation

Contributing

You want to help to make restgoose even better? Great!

Check out our code of conduct and our contributing guidelines for more information.

The Philosophy behind Restgoose

Restgoose takes its inspiration from Typegoose and Loopback. We also had some objectives in mind while writing Restgoose :