_-----_ | | .--------------------------. |--(o)--| | Let's create a LoopBack | `---------´ | application! | ( _´U`_ ) '--------------------------' /___A___\ | ~ | __'.___.'__ ´ ` |° ´ Y ` ? What's the name of your application? spike ? Enter name of the directory to contain the project: spike create spike/ info change the working directory to spike ... Next steps:
$ slc loopback:model Book ? Enter the model name: Book ? Select the data-source to attach Book to: db (memory) ? Select model's base class: PersistedModel ? Expose Book via the REST API? Yes ? Custom plural form (used to build REST URL): Let's add some Book properties now.
Enter an empty property name when done. ? Property name: name invoke loopback:property ? Property type: string ? Required? Yes
Let's add another Book property. Enter an empty property name when done. ? Property name: $
ngrokでREST APIを公開する
slc runコマンドを実行してREST APIを公開します。
$ slc run INFO strong-agent API key not found, StrongOps dashboard reporting disabled. Generate configuration with: npm install -g strongloop slc strongops See http://docs.strongloop.com/strong-agent for more information. supervisor running without clustering (unsupervised) Browse your REST API at http://0.0.0.0:3000/explorer Web server listening at: http://0.0.0.0:3000/