How to create dynamic Website

          Creating a dynamic website is a challenging task for new developers who are learning technology.
But here I will drive you to create a dynamic website with simple steps.

Technology Details
  •     keystone is the CMS framework and 
  •     Node.js is the server scripting language, 
  •     MongoDB is the database.

    You have to configure node.js and MongoDB for local instances. Configure Heroku for a free hosting service.Heroku provides up to 5 free hosting services for Node.js, Php, Java, Python technologies.

 1.   Login to http://keystonejs.com/getting-started/ website and download and install node.js, MongoDB.      While installing node.js and MongoDB, copy the path and paste in environment variables (control panelàSystemàenvironment variables ).   

      Configuration of mongo DB

NOTE: All installation steps that run in the Command Prompt (Admin) are done as an administrator.



MongoDB Configuration for localhost 


// Add MongoDB bin path to your system path environment variable

c:\mongodb\bin
Make MongoDB directories:

mkdir c:\mongodb\data
mkdir c:\mongodb\data\db
mkdir c:\mongodb\logs
mkdir c:\mongodb\conf
Download MongoDB 2.6.1 64-bit the ZIP version, unzip and move the bin folder to the folder c:\mongodb so it becomes c:\mongodb\bin

// Create the config file mongodb.conf on c:\mongodb\ with the following contents:

# mongodb.conf

# Data
dbpath=c:\mongodb\data\db

# Log
logpath=c:\mongodb\logs\mongodb.log
logappend=true

# Only run on localhost for development
bind_ip=127.0.0.1

# Default MongoDB port
port=27017

Install MongoDB as a service:

mongodconfig --install c:\mongodb\mongodb.conf --logpath c:\mongodb\logs\mongodb.log
Start MongoDB service:

net start MongoDB

     Configuration of Node.js

In your root directory run:

npm installg yo
npm install -g generator-keystone
                                
 Create a folder wherever you want,

mkdir my-test-project
cd my-test-project
yo keystone
node keystone

 Then open http://localhost:3000 to view it in your browser.

For Heroku hosting, create an Account in Heroku 

Download and install the Heroku tool bet

Copy  and paste the path in environment variables

Go to Command prompt and type npm install heroku

mLAB Account

Create a mLab account for the database, copy and paste the URL in. Env file in your project file

Create a Cloudinary account(if want), copy and paste the URL in. Env file in your project file 

Heroku hosting

Copy and paste all your config values and keys in Heroku config fields, then follow the following steps,

$Heroku login
$Git init
$ heroku git:clone -a urlname
$Git add .
$Git commitamyour changes
$ Git push heroku master

Type Heroku open, and see the website that you are created…



Popular posts from this blog

How to extract information from xml using node.js

How to clone a record using custom button in salesforce

salesforce questions and answers