You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jovan.cirkovic 02768007cd Finished #4515 1 年之前
db Initial commit 2 年之前
public Partly finished 1 年之前
src Finished #4515 1 年之前
.env.example Finished 2013 1 年之前
.eslintrc Partly done code-cleanup 2 年之前
.eslintrc.json Changed IP address for testing 2 年之前
.gitignore Added .env 1 年之前
Dockerfile Fixed: changed version to 4.0.28 1 年之前
README.md Changed documentation 2 年之前
log Home page grid system, Filters card 2 年之前
nginx.conf Fixed: changed app version to 4.0.30 1 年之前
package-lock.json Finished bugfix/1947 1 年之前
package.json Finished #4515 1 年之前
yarn.lock Added library 1 年之前

README.md

Trampa API Frontend

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:

Description

This is an internal project for e-commerce website called Trampa that was done by Diligent. Our project is hosted on our local git

Tech stack

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.

Node Package Manager

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

Development environment

Setup

Here we will show you how to set up project and run it in localhost.

Project setup

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.

Local project setup

You can run the project using

npm start

Congratulations! You now run website application on following website:

http://localhost:3000/

Production project setup

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.

Testing

Here we will show you how to run tests and see code coverage

Testing framework

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.