A boilerplate for Reactjs app using webpack, antd, less, redux, redux-saga.
This boilerplate is updated with:
- React 16.13+
- Antd 4x
- Less - css module
- Redux, Redux-saga
- Eslint
- Check if your Node.js version is >= 8.
- Clone this repository.
- Change the package's
name
,description
, andrepository
fields inpackage.json
. - Change the name of your extension on
public/manifest.json
. - Run
yarn
to install the dependencies. - Run
yarn dev
for development. - Run
yarn build
andyarn start
for production.
If you are developing an extension that talks with some API you probably are using different keys for testing and production. Is a good practice you not commit your secret keys and expose to anyone that have access to the repository.
Create a .env
file in the root directory of your project. Add environment-specific variables on new lines in the form of NAME=VALUE
. For example:
DB_HOST=localhost
DB_USER=root
DB_PASS=s1mpl3
process.env
now has the keys and values you defined in your .env
file.
const db = require('db')
db.connect({
host: process.env.DB_HOST,
username: process.env.DB_USER,
password: process.env.DB_PASS
})