the-glima / react-project

A React project that consumes an endpoint and display some data

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

React Project

A SPA Client for consuming and endpoint and showing some data.

Tech Stack

How to run

  • Using Docker
  • Using Yarn or NPM

Using Docker

if you have Docker installed just run:

$ docker-compose up --build

The build version of the application will be served on: http://localhost:8080

Using Yarn or NPM

For faster development workflow use Yarn.

Install dependencies:

$ yarn

Alternatively run: npm install

Run the application, it'll be served on: http://localhost:3000

$ yarn start

Alternatively run: npm run start

Run unit tests:

$ yarn test

Alternatively run: npm test

Lint code using:

$ yarn lint

Alternatively run: npm run lint

Run e2e tests using the terminal:

$ yarn test:e2e

Alternatively run: npm run test:e2e

Run e2e tests using Electron App:

$ yarn test:e2e:dev

Alternatively run: npm run test:e2e:dev

GitFlow

I'm using feature branches for my features/refactors/etc. Also, Squashing the commits when merging a PR to main, this way the main branch is cleaner and shows only meaningful commits. Not using Development branch but main directly.

GitHub Actions

I'm using GitHub Actions to will run linting, tests, and build tasks when pushing to a PR targeting main branch.

Environment Variables

I'm using cross-env and the .env file. Usually, I don't commit this file, these variables should be set in a CD context change its values for the different environments, i.e: Staging, Production. Check comments on .env file for more details.

About

A React project that consumes an endpoint and display some data


Languages

Language:TypeScript 74.4%Language:SCSS 17.0%Language:JavaScript 5.6%Language:HTML 1.4%Language:Dockerfile 0.9%Language:Shell 0.8%