Technologies | Overview | Getting started | Contributing | License
This project was developed with the following technologies:
Ecoleta is a marketplace that helps people find waste collection points efficiently.
First you need to have node
and yarn
installed on your machine. Then, you can clone this repository.
git clone https://github.com/monteiro-alexandre/ecoleta.git
Install dependencies:
yarn
Packages dependencies:
yarn bootstrap
Enter in folder packages/backend and Configure environment variables:
(create .env file based on .env.example)
# Port that the server is running, example: 3333
SERVER_PORT=3333
# URL from URL that of the application backend, example: http://localhost:3333
SERVER_URL=http://your_machine_ip_address:3333
Run database migrations:
yarn migrate:latest
Run database seeds:
yarn seed:run
Start server:
yarn start
Enter in folder packages/frontend and Configure environment variables:
(create .env file based on .env.example)
# backend url
REACT_APP_API_BASE_URL=http://your_machine_ip_address:3333
Start aplication:
yarn start
Enter in folder packages/mobile and Configure environment variables:
(create environment.ts file based on environment.example.ts)
import Constants from 'expo-constants';
const ENV = {
development: {
apiUrl: 'http://your_machine_ip_address:3333/',
},
staging: {
apiUrl: '',
},
production: {
apiUrl: '',
},
};
const getEnvVars = (env = Constants.manifest.releaseChannel): any => {
let environment;
// What is __DEV__ ?
// This variable is set to true when react-native is running in Dev mode.
// __DEV__ is true when run locally, but false when published.
// eslint-disable-next-line
if (__DEV__) {
environment = ENV.development;
} if (env === 'staging') {
environment = ENV.staging;
} if (env === 'production') {
environment = ENV.production;
}
return environment;
};
export default getEnvVars;
Start Expo DevTools:
yarn start
Than you can open the app in your cell phone using the Expo client app for IOS and Android, see:
Please read CONTRIBUTING.md for details on the code of conduct and the process for submitting pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.