Reactjs16+Redux+jest
Make sure you have git, node and npm installed globally and accessible through the command line.
git clone https://github.com/Shiva1029/react-demo.git
cd react-demo
npm i
npm start
npm run dev
Open the web browser to http://localhost:8888/
test@test.com
password
demo
To run unit tests:
npm test
Tests come bundled with:
npm run build
npm run serve:build
Open the web browser to http://localhost:8080/
There is a .eslint.rc
config for eslint ready with React plugin.
To run linting, run:
npm run lint
To fix
npm run lint:fix
Here is an example Nginx config:
server {
# ... root and other options
gzip on;
gzip_http_version 1.1;
gzip_types text/plain text/css text/xml application/javascript image/svg+xml;
location / {
try_files $uri $uri/ /index.html;
}
location ~ \.html?$ {
expires 1d;
}
location ~ \.(svg|ttf|js|css|svgz|eot|otf|woff|jpg|jpeg|gif|png|ico)$ {
access_log off;
log_not_found off;
expires max;
}
}