Skip to content

kPAX2 server - services to communicate the platform

Notifications You must be signed in to change notification settings

clubifaximatic/kPAX2_server

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

% README file
%
% This repo contains the kPAX platform server code
%
% TODO: Inclusion of the files structure


## Start server

You can specify parameters using local environment

MONGODB_URL: the mongodb connection URL

### Execute

```
MONGODB_URL="mongodb://readwrite:[email protected]:21462/kpax2" bin/www
```



## Test Endpoints

### list users GET

http://localhost:3000/user/list


### add user POST

http://localhost:3000/user

BODY

```
{
	"login": "[email protected]",
	"name": "Daniel Riera"
}
```
RESPONSE

```
{
	"login": "[email protected]",
	"name": "Daniel Riera",
	"created_at": "2016-06-08T06:12:45.841Z",
	"updated_at": "2016-06-08T06:12:45.841Z",
	"_id": "5757b75df7752041468230eb"
}
```

### list games GET

http://localhost:3000/game/list


### add game POST

http://localhost:3000/user

BODY

```
{
    "owner_id": "57546d42ff435e591d083d03",
    "name": "game1"
}
```
RESPONSE

```
{
  "name": "game2",
  "owner": "57546d42ff435e591d083d03",
  "status": 0,
  "nlikes": 0,
  "created_at": "2016-06-08T06:25:03.291Z",
  "updated_at": "2016-06-08T06:25:03.291Z",
  "_id": "5757ba3f8d7c2e6c46484ac5"
}
```

About

kPAX2 server - services to communicate the platform

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 96.4%
  • HTML 2.8%
  • CSS 0.8%