Git Product home page Git Product logo

southpark-api's Introduction

southpark-api

How to setup

Install nodejs on your laptop. Windows user will also have to install git-bash.

Follow following steps:

git clone [email protected]:piyushchauhan2011/southpark-api.git
cd southpark-api
npm install
DEBUG=myapp:* npm run debug

Preferred editor

Visual Studio Code: https://code.visualstudio.com/

Install Debugger for Chrome Plugin from extensions.

We are using Sequel Pro on Mac and MySQL Workbench on Windows.

Database Details

CREATE DATABASE southpark;
CREATE USER 'root'@'localhost' IDENTIFIED BY 'root';
GRANT ALL ON southpark.* TO 'root'@'localhost';
FLUSH PRIVILEGES;

CREATE TABLE users (
  id int(11) unsigned NOT NULL AUTO_INCREMENT,
  username varchar(255) DEFAULT NULL,
  password varchar(255) DEFAULT NULL,
  fullName varchar(255) DEFAULT NULL,
  email varchar(255) DEFAULT NULL,
  accessToken varchar(255) DEFAULT NULL,
  picture varchar(255) DEFAULT NULL,
  instagramId varchar(255) DEFAULT NULL,
  PRIMARY KEY (id)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;

Sample API routes

  1. POST to http://localhost:3000/auth/signup with email and password using postman to signup
  2. POST to http://localhost:3000/auth/login with email and password using postman to login
  3. GET to http://localhost:3000/users with Headers set to Authorization: Bearer <token> to get all the users from database (Authenticated route)

Debugging snapshots

screen shot 2016-07-30 at 7 27 14 am

screen shot 2016-07-30 at 7 26 02 am

southpark-api's People

Contributors

piyushchauhan2011 avatar

Watchers

 avatar James Cloos avatar  avatar

southpark-api's Issues

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.