Giter VIP home page Giter VIP logo

benfluleck / random-phone-number-generator Goto Github PK

View Code? Open in Web Editor NEW
20.0 2.0 4.0 2.79 MB

Random number generator is a full stack javascript app that implements a simple way to generate phone numbers in a file in an order specified

Home Page: https://phone-number-generator-staging.herokuapp.com/

JavaScript 95.89% Dockerfile 0.96% HTML 1.66% CSS 1.48%
phone-number postman nodejs phone-number-generator

random-phone-number-generator's Introduction

License: MIT Build Status Coverage Status

Random Phone Generator

The random phone number generator is a project inspired by my LMS Outputs for Andela for my D2 Assessments. The aim is to specify an amount of random phone numbers you would like to generate. The results are downloadable in a text file which consists of these phone numbers sorted in ascending or descending order.



Phone-number-generator-screenshot

Table of Contents

Getting Started

This is a javascript application built with Node JS using Express framework on the backend and React JS on the frontend. This application can run on any browser that is not IE ๐Ÿ˜€ as there are issues with the file-downloader.

Technology Stack

UI & Templates

  1. Bulma CSS Framework
  2. Styled-components

Server Side

  1. NodeJS
  2. Express FrameWork

Client Side

  1. React JS
  2. WebPack

Installation

  1. Install Node JS.

  2. Clone the repository here

  3. [cd] into the root of the project directory.

  4. Run yarn install on the terminal to install project dependecies

  5. Create a .env file in the root directory of the application. Example of the content of a .env file is shown in the .env.sample

  6. Start the application: Different Build Environments

Production

yarn build:client-prod
yarn build:server-prod
yarn start:server-prod

Development

yarn client:dev
yarn server:dev

Testing

Sever side tests - Run yarn test on the terminal while within the project root directory. Client side tests - Run yarn client:test on the terminal while within the project root directory.

Server side testing is achieved through use of chai-http, mocha and chai packages. chai-http is used to make requests to the api and mocha is the testing framework and chai is the exception library. They will both be installed when you run npm install and the tests will run when you run npm test.

Client side testing is achieved through the use of jest package. jest is used to test javascript code in React applications.

API Endpoints

Api endpoints were created using express router. The routes are defined under src/routes/index.js.

Request type Endpoint Action
POST /api/v1/phonenumbers?order Generates a list of phone Numbers in a particular order
GET /api/v1/phonumbers Gets the information about the phone numbers generated
GET /api/v1/download Downloads the files that are generated

Questions

For more details contact [email protected]

Support or Contribution

For any suggestions or contributions or issues please do raise them or email me. For Contributiions, Please clone the repo and implement a PR I would appreciate it

random-phone-number-generator's People

Contributors

dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.