Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

cows-onepage

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cows-onepage

A one page website demo.

latest
Source
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

A One Page Website Demo

This is a one page RWD website to show case how easily you can create & manage a website using coServ. The web desgin was kept to minimum so you can easily modify it to suit your needs.

Install & Run

You can install the website using npm:

npm install cows-onepage

Once the package is installed, you can change to the install directory and type:

node startWeb

That will start the website. You can point your browser to http://127.0.0.1:8080 to see the results.

Deploy To Heroku

The demo website is ready for Heroku deployment right out of the box. There are only two minor changes you have to make. First of all, change the port setting in the startWeb.js file (line #9) to "process.env.PORT" (see the sample code below).

var  serverConfig = {
        "apiEngine": {
            "host": "coimapi.tw",
            "port": 80,
            "method": "POST"
        },
        "server": {
            "wwwPath": __dirname,
            "port": process.env.PORT,
            "maxSockets": 200
        }
     },
     coServ = require('coserv');

coServ.init(serverConfig);
coServ.restart();

You'll also need to assign the domain name of your Heroku machine to the demo website. Replace "127.0.0.1" with your Heroku domain in the sites.json file.

Now you can push the whole website to Heroku using 'git push heroku master' and that's it. Your website is now available to the world.

Documentation

A simple article has been included to show you how to modify this demo website to become your own.

Keywords

Node.js

FAQs

Package last updated on 26 Feb 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts