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
Make sure you have the following installed:
- Node.js >= 7.0.0
- TypeScript >= 2.0.0
npm i -g typescript
- TypeScript Node >= 3.0.0
npm i -g ts-node
Then:
git clone https://github.com/strongloop/loopback-next.git
cd loopback-next
npm install
npm run bootstrap
npm test
# proceed to creating index.ts
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.
Ritchie Martori | Raymond Feng | Miroslav Bajtos | Rand McKinney | Simon Ho |
---|---|---|---|---|
See all contributors.
MIT