• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

Using Own PC as a Test Machine for Valence Apps - Question on Post-Install Setup

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using Own PC as a Test Machine for Valence Apps - Question on Post-Install Setup

    There is blog post of April 20, 2015 titled "Using your own PC as a test machine for Valence apps". Inside the post, there is section named "Post-Install Setup". In there, a script is provided (file named server.js), part of which is a set of statements to route Valence calls through proxy.

    app.all('/valence/*', valenceProxy); app.all('/portal/*', valenceProxy); app.all('/resources/*', valenceProxy); app.all('/build/*', valenceProxy); app.all('/desktop/*', valenceProxy); app.all('/extjs5/*', valenceProxy);

    Unless I am mistaken, those represent web configuration aliases. I am not sure about the /extjs5 thing because there is no such alias even in my Valence 4 installation. Anyway, I figure that for my Valence 5 installation I would need the following statements in my server.js file based on the web configuration aliases for Valence 5 instance.

    app.all('/valence/*', valenceProxy); app.all('/portal/*', valenceProxy); app.all('/resources/*', valenceProxy); app.all('/vvresources/*', valenceProxy); app.all('/service/*', valenceProxy); app.all('/desktop/*', valenceProxy); app.all('/extjs/*', valenceProxy);

    Am I correct?

    Thanks
    Alex

  • #2
    I was able to set up a local Valence server following the blog instructions, not without a few hiccups.

    Here are where I think the blog post could be slightly corrected or clarified.

    1. The post goes:

    "On your PC, open your Terminal or command prompt, make sure you are in your home directory, then run the following command:

    node server.js"

    Being in the home directory and having added server.js file inside the root of the application directory, the path to server.js file would need to be added.

    node <path from home directory or absolute path to server.js>/server.js

    2. The require statements inside server.js would need to be modified to include the paths to express and http-proxy.

    3. The forever start statement given in the blog appears to be incorrect in that it will work only on the first invocation of the server and will fail on the subsequent invocations.

    The error is:

    "Cannot start forever. Log file <home directory>.forever\true.log exists."

    I figured that the following modification to the given forever start command will work around the issue, outside of removing true.log file.

    Instead of

    "forever start -uid <my-xxx-server> -a server.js"

    run

    "forever start -a -uid <my-xxx-server> server.js"

    In other words, option -a should immediately follow forever start.

    4. Forever stop command, as given, would not work for me,

    forever stop <my-xxx-server>

    (<my-xxx-server> being the same as used in the forever start command)

    The error is:

    "Forever cannot find process with id: <my-xxx-server">"

    I did not have the time to research it but figured that forever stopall would work for me instead.
    Last edited by alexkra; 03-20-2017, 06:46 PM.

    Comment

    Working...
    X