Skip to content

Ecoleta is a marketplace to help people to find garbage collection points efficiently

License

Notifications You must be signed in to change notification settings

gagigante/EColeta-NLW1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ecoleta

Ecoleta

GitHub language count Repository size GitHub last commit Repository issues License

Technologies   |    How to run   |    Project   |    How to contribute   |    License


Frontend

🚀 Technologies

This project was developed with the following techs:

💻 Project

Ecoleta is a marketplace to help people to find garbage collection points efficiently.

🏃 How to run

BACKEND:

So access the fold server and run:

To install dependencies

  $ yarn
  
  or

  $ npm install

To run the migrations

  $ yarn knex migrate:latest

  or

  $npm knex migrate:latest

You need to update some files with your current IP address:

server/src/controllers/ItemsController.ts

  const serializedItems = items.map(item => {
    return {
      id: item.id,
      title: item.title ,
      image_url: `http://YOUR_IP_ADDRESS:3333/uploads/${item.image}`,
    };
  });

server/src/controllers/PointsController.ts

  const serializedPoints = points.map(point => {
    return {
      id: point.id,
      title: point.title ,
      image_url: `http://YOUR_IP_ADDRES:3333/uploads/${point.image}`,
    };
  });
  const serializedPoint = {
    ...point,
    image_url: `http://YOUR_IP_ADDRES:3333/uploads/${point.image}`,
  };

So you can run the api:

To start the server

  $ yarn dev

  or

  $ npm dev

WEB:

Just access the fold web and run:

To install dependencies

  $ yarn
  
  or

  $ npm install

To start the server

  $ yarn start

  or

  $ npm start

MOBILE:

First you need to edit the file api.js with your current IP address.

mobile/src/services/api.js

import axios from 'axios';

const api = axios.create({
  baseURL: 'http://YOUR_IP_ADDRESS:3333',
});

export default api;

So access the fold mobile and run:

To install dependencies

  $ yarn
  
  or

  $ npm install

To start the server

  $ yarn start

  or

  $ npm start

🤔 How to contribute

  • Fork this repo;
  • Create a branch for your new feature: git checkout -b my-feature;
  • Commit your changes: git commit -m 'feat: My brand new feature';
  • Push it to your branch: git push origin my-feature.

After merge of your pull request, you can delete your branch.

📝 License

This project is under MIT license. See the file LICENSE for details.


About

Ecoleta is a marketplace to help people to find garbage collection points efficiently

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published