random-phone-number-generator is a monolithic javascript application that generates random phone numbers for a telecommunication company. The length of a phone number is 10 digits starting with a zero.
-
Libraries, tools and Frameworks
- React js - A JavaScript library for building user interfaces
- Redux - A state management tool for javascript applications
- Node js - Javascript runtime environment
- Express js - A Javascript web applications framework.
- webpack 4 - A bundler for assets and scripts
- Babel 7 - A Javascript transpiler that transforms the latest versions to browser compatible versions.
-
Clone the repository -
$ git clone https://github.com/koechkevin/random-phone-number-generator.git -
Change into the project directory -
$ cd random-phone-number-generator -
Install the dependencies -
$ yarn install- Please provide the following environment variables
DATABASE_HOST - your database host name DATABASE_NAME - The name of your database DATABASE_PASSWORD - password DATABASE_URL - URI for your database DATABASE_USER - your username on the database TEST_DATABASE - This a database name you will run the tests against PORT - the port number your application will run on. This defaults to 3000 if its not provided- Transpile the code and bundle by running
$ yarn build - Run any available migrations -
$ yarn migrate - Run the server
$ yarn start
- Start the api with
$ yarn dev:back. This uses the default port you provided on environment variables - Run any available migrations -
$ yarn migrate - Start the application by running the command
$ yarn start:dev. This will run the application and serve on port 8080.
- Run the tests using
$ yarn test
