Installing LoopbackJs on Ubuntu 16

NodeJs Tony Arcucci

NodeJS and NPM are the requirement for the installation of LoopbackJs. I’m using NodeJs v. 4.2.6 on Ubuntu 16.

Now install LoopbackJs globally:

npm install -g strongloop --save

Create a symbolic link:

sudo ln -s /usr/local/lib/node_modules/strongloop/bin/slc.js /usr/bin/slc

During the installation LoopbackJs were reported errors related to the Python version , the PC was installed 3.5 , I had to install version 2.7 in order to make Python scripts compatible .

The problem with Python is gone, but I get the following error during the build phase:


LINK : fatal error LNK1194: impossibile effettuare il caricamento ritardato di 'node.exe' a causa dell'importazione del simbolo di dati '"__declspec(dllimport) const v8::ArrayBuffer::Allocator::`vftable'" (__imp_??_7Allocator@ArrayBuffer@v8@@6B@)'; effettuare
il collegamento senza l'opzione /DELAYLOAD:node.exe [C:\MAMP\htdocs\manager\node_modules\strong-debugger\build\debugger.vcxproj]

Also I get the following messages :


npm WARN optional Skipping failed optional dependency /strongloop/modern-syslog:
npm WARN notsup Not compatible with your operating system or architecture: modern-syslog@1.1.3
npm WARN optional Skipping failed optional dependency /strong-supervisor/modern-syslog:
npm WARN notsup Not compatible with your operating system or architecture: modern-syslog@1.1.3

For now ignore them, we see what happens.

I try to do a test model as explained http://loopback.io/getting-started/ with some modifications as follows:

slc loopback (or node node_modules\strongloop\bin\slc loopback if slc isn’t in path).

Select the name of the application, it is proposed to the current folder name, in my case ‘manager’

It asked the type of application you’re building between api-server, empty-server, hello-world. For the test application, select hello-word then follow the http://loopback.io/getting-started/ document

To launch the application ARC management:

slc arc

It responds with

Swagger: skipping unknown type "subscription".
Swagger: skipping unknown type "subscription".
Loading workspace C:\MAMP\htdocs\manager
StrongLoop Arc is running here: http://localhost:59531/#/

and the default browser will open automatically to the login screen where you need an account Strongloop

Attention, the listen port (in this example, 59531) is assigned dynamically, therefore, at every boot is changed.

[cml_media_alt id='156']StrongLoop Arc[/cml_media_alt]

To run the application:

node .

It responds with

Web server listening at: http://localhost:3000
Browse your REST API at http://localhost:3000/explorer

Now you can test the installation by opening a browser and going to: http://localhost:3000

Enjoy!

 

4/5 (1)

Please rate this

Lascia un commento