#Random Startup Website Generator
##User Stories
- As a user, I want to be able to enter a name of the website that will be generated.
- As a user, I want to be able to view a generic website for the startup name that I entered.
- As a user, I want to see generic stock pictures of happy people in my website.
- As a user, I want to see generic exciting statements and descriptions in my website.
- As an admin, I want to view if any errors occur on the site and descriptive errors of what happened.
Used http://www.1stwebdesigner.com/create-scrolling-parallax-website/ as a template for creating the website, as well as the following bootstrap templates: http://startbootstrap.com/template-overviews/clean-blog/ http://startbootstrap.com/template-overviews/freelancer/ http://startbootstrap.com/template-overviews/stylish-portfolio/
##Implementation
The user is first brought to a form where they enter their company's information and pick a picture. When they click generate website, they are brought to a randomly generated website. They can press refresh to see a newly generated website.
The websites' sentences are generated by randomly combining phrases that also utilize the information that the user entered in the form. Phrases are generated in a tree object that has a getRandomChild() method. The websites' pictures are chosen from a pool of similar images to the image the user selected in the form.
The website is written in node.js and utilizes jade and express. Tests are written with the nightwatch framework and mocha framework.
##Running the application
You will need the following dependencies:
- express
- jade
- mocha
- nightwatch
- body-parser
These can all be pulled from the package.json.
cd to the directory and run 'node index.js' in the command line. Go to your browser and run localhost:3000.
##Running Tests
The project uses nightwatch.js to test browser automation. It currently runs tests on the Chrome browser. If you need to run on Firefox or IE consult this developer guide: http://nightwatchjs.org/guide#test-runner
Change your directory to the test folder and run "nightwatch" in the command line to run the browser tests (NOTE: you must install nightwatch globally to use this command). Make sure you are simultaneously running the project through a second command line window and run 'node index.js'.
The project also uses mocha to test mainly the sentence generation files. Run mocha mocha_tests.js in in the command line to run these tests (in the test folder).
###Note
There is a simple test for randomness that calls getRandomChild() 100 times. This test will fail occasionally due to pure chance, but should pass most of the time.