Installing Web Server

After install Node.js and npm Package Manager at previous step, now you have to install some tools, dependencies to run the Kindie web server:

Step 1: Open Kindie project by Visual Studio Code:

Note: You can toogle terminal by hot keys Ctrl + `

Step 2: Install Sails.js using npm Package Manager:

npm -g install sails
Sails.js is a small framework build on top of Express and Node.js framework. You can refer full document about SailsJs here:


Step 3: Install others npm Package Manager:

npm install

Step 4: Run MongoDB server
To start MongoDB, run mongod.exe. For example, from the Command Prompt:

C:\Program Files\MongoDB\Server\3.6\bin\mongod.exe

This starts the main MongoDB database process. The waiting for connections message in the console output indicates that the mongod.exe process is running successfully.

You can refer full document about MongoDB here:


Step 4: Config database and settings web server
If you need to test on dev eviroment, modify the config here:

config > env > development.js

4.1 Modify the database configuration:

      // ssl: true,
      adapter: 'sails-mongo',
      host: '', // defaults to `localhost` if omitted 
      port: 27017, // defaults to 27017 if omitted 
      user: '', //optional
      password: '', //optional
      database: 'kindiedb' // or omit if not relevant

4.2 Modify socket config ( For realtime chatbox mobile application): replay our config with your domain

      onlyAllowOrigins: [

4.3 Modify port: default port for development environment is 1337, you can change what you want

      port: 1337,

4.2 Modify socket config ( For realtime chatbox mobile application): replay our config with your domain

Note: For production, you have to config the same things but with this file: config > env > production.js

Step 5: Config email server to send email

        service: "Mailgun", 
	auth: {
		user: "no-reply@yourdomain",
		//pass: "key-xxx"
		pass: "yourpassword"
	templateDir: "api/emailTemplates",
	from: "no-reply@yourdomain",
	testMode: false,
	ssl: true

By default we are using Mailgun service, you need to register an account via https://www.mailgun.com/ then input the username/password here. Mailgun supports us to send with 10,000 free emails and a 100 free validations every month.
Step 6: Run the app
From terminal console Visual Studio Code, run:

        sails lift

will run sails project on port 1337 by default.

If you get the log message like this, congratulation, you installed successfully the Kindy Web server.

Note: For production, you can run by command sails lift --prod

Note: On production server, You can create .env file and define also all the configurations via .env file at root folder:


Have fun!

Leave a Reply

Your email address will not be published. Required fields are marked *