Skip to content

hello-steven/random-intel-codename

Repository files navigation

Random Intel Codenames

CircleCI

Simple app for getting random Intel codename

Public URL

Hosted on Heroku Free Tier

Preview Gif

Inspiration

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

  • node >= v6.9
  • npm >= v3.5

Installing

To get Random Intel Codename server running on your local machine do the following steps.

  1. git clone https://github.com/whiteboxpub/random-intel-codename.git
  2. cd random-intel-codename
  3. ./install.sh
  4. npm run start || npm run start-watch

nodemon should now be active running the server on port 3000. You can access the frontend via http://localhost:3000 . For just getting names you can request http://localhost:3000/name . Changes in the code will auto reload thanks to nodemon.

Running the tests

Yay TDD! We are currently using dependency injection with along side libraries: mocha, chai, sinon, and supertest to facilitate testing. Also have CircleCI hooked up to make sure all test are passing before merging pull request.

Run test locally

Run tests once: npm run test

*mocha included as dependancy so you don't have to have mocha installed globally

Continuously run tests on file save: npm run test-watch

*currently can't run tests while running the server because both use port 3000

And coding style tests

We use ESLint to avoid divergent coding styles. The process goes:

npm run lint --> fix style errors --> repeat

Deployment

Heroku deployment

  1. Follow install instructions to get things up and running locally first.
  2. Make sure you have heroku account and heroku-cli
  3. Init heroku with heroku create
  4. Push code to heroku ./deploy.sh
  5. Create a single dyno heroku ps:scale web=1
  6. Open Project with heroku open.
  7. Boom the app is live on the web!
  8. Add /name to the URL to just return a random codename.

Built With

  • Foswig.js - Power behind shuffle feature
  • Express.js - The Nodejs server framework used
  • axios - The request library used
  • Babel - The ES6 compiler used
  • NPM - The dependency manager used

Versioning

We use SemVer for versioning. For the versions available, see the releases page.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

  • All data is scraped from this wikipedia page. These names are probally under Intel copywrite.