Skip to content

Commit 25d3b7c

Browse files
author
llaske
committed
Update README with NODE_ENV and MongoDB --repair tips
1 parent b90104d commit 25d3b7c

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ To run Sugarizer Server **without Docker**, follow the step behind. Commands are
5353
sudo apt-get install mongodb
5454
sudo mkdir -p /data/db
5555

56-
**Install Sugarizer Client and Server**: If need, you could update sugarizer-server/sugarizer.ini file (update port for web, mongodb or presence)
56+
**Install Sugarizer Client and Server**: If need, you could update sugarizer-server/sugarizer.ini file (update port for web, mongodb or presence, see below)
5757

5858
sudo apt-get install git
5959
cd /home/root
@@ -67,18 +67,22 @@ To run Sugarizer Server **without Docker**, follow the step behind. Commands are
6767
sudo mongod --fork --port 27018 --logpath /home/root/mongo.log
6868
sudo nohup node sugarizer.js > /home/root/sugarizer.log &
6969

70+
*Warning:* If your server had an unclean shutdown on previous boot, MongoDB could not start correctly telling that some files are locked. In that case, launch first:
71+
72+
sudo mongod --repair
7073

7174
**Check your install**: To check your install, run "http://127.0.0.1:8080" in your browser:
7275

73-
* you should see the home with all activities,
74-
* once a new user created, go to Journal view, you should see at the bottom of the screen the two icons to switch to private/shared journal,
76+
* once a new user created, you should see the home with all activities,
77+
* go to Journal view, you should see at the bottom of the screen the two icons to switch to private/shared journal,
7578
* go to the neighborhood view, you should see one icon for the server and one for you.
7679

7780

7881
## Server settings
7982

80-
If needed, Sugarizer Server settings could be changed using the [sugarizer.ini](env/sugarizer.ini) config file (you could use another name for this file: just pass the new name
81-
as [sugarizer.js](sugarizer.js) parameter).
83+
Sugarizer settings are load by default from file [env/sugarizer.ini](env/sugarizer.ini). You could change the name of this file by changing the value of environment variable ``NODE_ENV``. So if the ``NODE_ENV`` variable is set to ``production``, Sugarizer will try to load ``env/production.ini`` file.
84+
85+
Following is the typical content of Sugarizer Server settings file:
8286

8387

8488
[information]
@@ -128,7 +132,7 @@ The **[web]** section describe the settings of the node.js process. By default,
128132

129133
The **[security]** section regroup security settings. `min_password_size` is the minimum number of characters for the password. `max_age` is the expiration time in milliseconds of a session with the client. At the expiration of the session, the client should reenter its password. Default time is 172800000 (48 hours). Parameters `https`, `certificate_file`, `key_file` and `strict_ssl` are explain above.
130134

131-
The **[client]** indicate the place where is located Sugarizer Client. Sugarizer Client is need by the server. WARNING: currently, only the **dev** branch of Sugarizer repository works with Sugarizer Server.
135+
The **[client]** indicate the place where is located Sugarizer Client. Sugarizer Client is need by the server.
132136

133137
The **[presence]** section describe the settings of the presence server. By default, a web socket is created on port 8039. You need to change this value if you want to use another port.
134138

0 commit comments

Comments
 (0)