Skip to content
Branch: master
Find file History
bajtos chore: remove local dependencies from package-lock files
Remove local dependencies from all package-lock.json files. These
dependencies are installed as symlinks by `lerna` and do not belong
to package locks.

Before this change, symlinks created by `lerna` were overwritten by
published package versions installed by `npm ci`.
Latest commit 1d658fb Mar 15, 2019
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
.vscode
data feat: add express example Feb 28, 2019
public feat: add express example Feb 28, 2019
src
.npmrc
.prettierignore
.prettierrc
CHANGELOG.md
LICENSE
README.md
index.d.ts
index.js
index.ts
package-lock.json
package.json chore: update p-event to version 4.0.0 Mar 14, 2019
tsconfig.build.json
tslint.build.json
tslint.json feat: add express example Feb 28, 2019

README.md

@loopback/example-express-composition

This is an example of how to mount LoopBack 4 REST API on a simple Express application.

Setup

First, you'll need to install a supported version of Node:

Additionally, this tutorial assumes that you are comfortable with certain technologies, languages and concepts.

  • JavaScript (ES6)
  • REST

Lastly, you'll need to install the LoopBack 4 CLI toolkit:

npm i -g @loopback/cli

Tutorial

Once you're ready to start, you can begin by visiting the tutorial page.

Try it out

If you'd like to see the final results of this tutorial as an example application, follow these steps:

Generate the example using CLI

  1. Run the lb4 example command to select and clone the express-composition repository:

    $ lb4 example
    ? What example would you like to clone? (Use arrow keys)
     todo: Tutorial example on how to build an application with LoopBack 4.
     todo-list: Continuation of the todo example using relations in LoopBack 4.
     hello-world: A simple hello-world Application using LoopBack 4.
     log-extension: An example extension project for LoopBack 4.
     rpc-server: A basic RPC server using a made-up protocol.
     soap-calculator: An example on how to integrate SOAP web services.
    > express-composition: A simple Express application that uses LoopBack 4 REST API.
  2. Jump into the directory and then install the required dependencies:

    cd loopback4-example-express-composition
  3. Finally, start the application!

    $ npm start
    
    Server is running at http://127.0.0.1:3000

Feel free to look around in the application's code to get a feel for how it works.

Tests

Run npm test from the root folder.

License

MIT

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.