Giter Site home page Giter Site logo

babble-server's Introduction

Babble Backend

Dit is de backend voor Babble. Volledig geschreven in Javascript, draait op NodeJS.

Server starten

  1. Installeer CouchDB, MySQL en NodeJS. Hoe dit te installeren is, verschilt per OS.
  2. Clone deze repository.
  3. Installeer alle dependencies uit package.json met npm install
  4. sudo node server.js

API responses

Een typische response van de Babble API bestaat uit 2 bestanddelen:

  • Status
  • Data

Status

Dit veld is een numerieke waarde die de status van een API request aangeeft. Hiervoor worden de HTTP status codes gebruikt. Dit houdt dus in dat status code 200 betekent dat de request gelukt is, 404 dat er geen resultaten gevonden zijn en 500 dat er iets fout gegaan is (met de opgegeven data of met de server). Alle HTTP codes kunnen in principe voorkomen (zo wordt ook 206 gebruikt, om aan te geven dat de opgegeven data incompleet is).

Data

Dit is het belangrijkste veld. Het bevat de data die opgevraagd is, in de vorm van een JSON object of JSON array, afhankelijk van het type request.

Overzicht API endpoints

User API

GET /user/:userId/check

GET /user/:userId

GET /user/:userId/matches

GET /user/:userId/match/:matchId

POST /user/authenticate

POST /user/:action

PUT /user/:userId

DELETE /user/:userId

Feed API

Chat API

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.