Giter Club home page Giter Club logo

adventure-mars-backend's Introduction

Adventure Mars Backend

This repo contains the code for the Adventure Mars Backend

Table of contents:

  1. Pre requirements
  2. Configuration
  3. Running the app 4.ย Build for production
  4. Documentation

Pre requirements

  • node.js v8.X.X
  • MySQL server
  • build essentials for your system
  • create a DB called 'geocache' with utf8 encoding

Configuration

You must have gulp-cli installed globally on your machine. You can install it running the following command:

npm install -g gulp-cli

and you must have all the project's dependencies installed. You can install them running the following command:

npm install

Then you must create a copy of .env.example called .env and put all your env variables there

cp .env.example .env

Running the app

To run the app on development mode you need to run the following command

gulp watch

Build for production

to build for production run the following command:

npm run build

Documentation

Please read backend/docs/Framework.md.

You can read the API documentation at http://localhost:8888/apidoc/ when running locally

You can try examples for using the API with this Postman collection: https://www.getpostman.com/collections/93762bf02bd53fd26412

Configure MySQL

If you are using MySQL 8.0 or newer, you will need to change the configuration of the MySQL server to allow password authentication, you can do it running the next lines inside the mysql cli (mysql -u root -p):

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
FLUSH PRIVILEGES;
EXIT;

Where root is your user localhost id your URL and password is your password.

You also need to configure the timezones form MySQL, on macOS use this command (ignore warnings):

mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql

TLDR: For local development (no password) do:

mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql
mysql -u root -p
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '';
FLUSH PRIVILEGES;
EXIT;

adventure-mars-backend's People

Contributors

mishelashala avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.