Installation

To begin working on the back-end app follow these steps.

Clone the repository

Navigate to your projects folder and clone the repository.

$ cd ~/path/to/projects/dir
$ git clone *repository link*
Install dependencies

Move into the cloned client directory and install the dependencies.

$ cd Backend-Server
$ npm install
Install mysql
$ sudo apt-get install nodejs

Note your mysql credentials later you'll need it later.

Create a Peach database

Connect yourself to the mysql console (Note that there is no space between -p and the password) and create database.

$ mysql -u *user* -p*password*
$ CREATE DATABASE peach;
$ exit

Configure the app

Edit the file api/database.js and set your database information.

Start the app

Start the express server and begin hacking 🤓

$ sudo node index.js

The make sure that the server runs visit localhost:8080/api. You should see the following JSON:

{
    "message":"Hooray! Welcome to the Peach api!"
}

Now to automatically create the required tables simply visit localhost:8080/api/init.

You're done! 👍🏻

results matching ""

    No results matching ""