jovan.cirkovic 02768007cd Finished #4515 | 1 rok temu | |
---|---|---|
db | 2 lat temu | |
public | 1 rok temu | |
src | 1 rok temu | |
.env.example | 1 rok temu | |
.eslintrc | 2 lat temu | |
.eslintrc.json | 2 lat temu | |
.gitignore | 1 rok temu | |
Dockerfile | 1 rok temu | |
README.md | 2 lat temu | |
log | 2 lat temu | |
nginx.conf | 1 rok temu | |
package-lock.json | 1 rok temu | |
package.json | 1 rok temu | |
yarn.lock | 1 rok temu |
Welcome to frontend application for trampa website. In next sections we will walk you through our project, setting it up on your computer, building it for production and last but not the least walk you through tools that we used:
This is an internal project for e-commerce website called Trampa that was done by Diligent. Our project is hosted on our local git
In this project we used Node and N(ode)P(ackage)M(anager) for initializing project and importing a lot of libraries that helps us developing.
This project was bootstrapped with Create React App. Every HTTP request is implemented via Axios, and for handling asynchronous code we used Saga.
In order to run this project you need to install Node that comes with its Package Manager. Please follow the official tutorial on installing Node which can be found on this link:
https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
Here we will show you how to set up project and run it in localhost.
In order to run our project you need to clone it from git first. Open terminal (cmd and powershell work as well) in folder that you want this project to be and run command
git clone http://git.dilig.net/selenaaasi/trampa-frontend.git
After cloning project you can open it with your preferred IDE/Code editor if you want to see the code. Before running project you need to open terminal and run command
npm install
Running that command will download all necessary npm packages to run the project.
Now your project is ready for setup on both local and production environment.
You can run the project using
npm start
Congratulations! You now run website application on following website:
You can make the production build using
npm run build
Congratulations! You now have production build which is ready for deploy! The build is minified and the filenames include the hashes. It correctly bundles React in production mode and optimizes the build for the best performance.
When your application is deployed you can run it using:
npx serve -s build
See the section about deployment for more information.
Here we will show you how to run tests and see code coverage
We needed to write tests, unit, integration and E2E. Framework that we used for that is called jest.
When we write our tests we can use following comand:
npm test
which launches the test runner in the interactive watch mode.\ See the section about running tests for more information.