Skip to content

SanderHeling/react-starter-kit

Repository files navigation

React Starter Kit

React starter kit using React 16.

Technology

TODO

  • Tests for Modal component

Install

yarn

Run

yarn start

Go to http://localhost:8080/ and try it out.

Test

Contains only one component test for now, just an example how testing works.

yarn test

Build

Build a production ready version

yarn build

When the build is ready you can find the files in the dist/ folder.

Environment variables

You can set the environment variables in the files development.js and production.js located in the env directory. When you change the env file you need to run yarn start again. The env files need to export an object contain. This object can contain overrides for webpack en environment variables used in the app. When you want to use the env variables in your application you can get them by using process.env.

// development.js
module.exports = {
    webpack: {
        output: {
            publicPath: 'http://localhost:8080/',
        },
    },
    app: {
        apiUrl: 'http://localhost:8000/api/',
    },
};

It's also possible to load a different environment config (e.g. mock.js). Create the file in the env directory and run the application again with an extra ENV setting that has the same name.

ENV=mock yarn start

About

Starter kit for React project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published