Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • To run Dexter Server, you need to type the following command in the Dexter-server folder.

    Code Block
    languagebash
    themeEmacs
    titleRUN COMMAND
    root@~> cd /usr/local/share/dexter-server_v#.#.#
    root@/usr/local/share/dexter-server_v#.#.#> node server.js -p=4982 -database.host=localhost -database.name=my_dexter_db -database.user=dexter-user -database.password=mypassword >> console.log &
    Dexter server listening on port 4982         // <== server started correctly
    DB Connection is fine : localhost:3306       // <== DB Connection is OK
    • -p=port_number : You can change the Dexter server port number. The port number is used to access the Dexter Server by Dexter Clients such as Dexter WEB or Dexter Eclipse.

    • -database.host=mysql_db_ip : Try using the IP address of the database server.

    • -database.naem=my_dexter_db : Enter the name of the Dexter database that is created by previous step.

    • -database.user=db_user_id : The ID you entered for the Dexter database.
    • -database.password=db_user_password : The password you entered for the Dexter database.

  • You can view the logs from "console.log" and "./log/dexter-server.log" files. 
    • Note : You have to delete this file by yourself, if the file size is too large.
  • You can manage the Dexter server with PM2. PM2 manages your applications states, so you can run processes consistently. Refer to the following steps to install PM2 and use it.

    Code Block
    languagebash
    themeEmacs
    titlePM2 COMMAND
    root@~> cd /usr/local/share/dexter-server_v#.#.#
    root@~> npm install pm2
    root@/usr/local/share/dexter-server_v#.#.#> vim pm2-dexter-server.json //Please refer to the following sample : pm2 setting for running dexter server.
    root@/usr/local/share/dexter-server_v#.#.#> pm2 start pm2-dexter-server.json
    ┌───────────────────────┬────┬─────────┬───────┬─────────┬─────────┬────────┬─────────────┬──────────┐ 
    │ App name              │ id │ mode    │ pid   │ status  │ restart │ uptime │ memory      │ watching │ 
    ├───────────────────────┼────┼─────────┼───────┼─────────┼─────────┼────────┼─────────────┼──────────┤ 
    │ dexter-server         │ 0  │ cluster │ 28402 │ online  │ 0       │ 0s     │ 45.016 MB   │ disabled │ <== server started correctly
    └───────────────────────┴────┴─────────┴───────┴─────────┴─────────┴────────┴─────────────┴──────────┘ 
    
  • The following is PM2 setting sample file : pm2-dexter-server.jsonth

    Code Block
    languagebash
    themeEmacs
    titlepm2-dexter-server.json
    {
     "apps":[{
       "name":"dexter-server",
       "script":"server.js",
       "args":[
      "-p=4982", 
      "-database.host=localhost", 
      "-database.name=my_dexter_db", 
      "-database.user=dexter-user" , 
      "-database.password=mypassword", 
      "-server.name=dexter-server"
      ],                         
       "instances":1,
       "force":true
     }] 
    }

...