4.0.0-alpha.1 • Published 7 years ago

loopback-next v4.0.0-alpha.1

Weekly downloads
7
License
MIT
Repository
github
Last release
7 years ago

loopback-next

Gitter Build Status

LoopBack makes it easy to build modern applications that require complex integrations.

  • Fast, small, powerful, extensible core
  • Generate real APIs with a single command
  • Define your data and endpoints with OpenAPI
  • No maintenance of generated code

Installation

Make sure you have the following installed:

Then in your Node.js project root, run:

npm install -S @loopback/core

Make sure you set "target": "es6" in your compiler options in your tsconfig.json if you're using a TypeScript project. See the installation wiki for detailed information.

Example

A basic controller:

export class UserController {
  async getUserByName(username: string): Promise<UserResponse> {
    const users = new UserRepository();
    const user = await users.findOne({where: {username: username}});
    if (!user) {
      throw createHttpError.NotFound(`User ${username} not found.`);
    }
    return new UserResponse(user);
  }
}

See loopback-next-example for more.

Documentation

Team

Ritchie MartoriRaymond FengMiroslav BajtosRand McKinneySimon Ho

See all contributors.

Contributing

License

MIT