Giter Club home page Giter Club logo

trz's Introduction

The Resident Zombie

Instalation

1 - Install nvm from here

2 - Run nvm install

3 - npm install -g run-rs to install mongodb database with replica-set

4 - npm install

5 - npm run start or node @babel/register index.js

Endpoints

1 - GET /survivor - Gets all survivors that weren't infected

2 - GET /survivor/{id} - Gets a survivor by id

3 - POST /survivor - Sign up (create a survivor)

{
	"name": "Luiz Filipe",
	"age": 34,
	"gender": "male",
	"inventory": ["Fiji Water", "AK47", "First Aid Pouch", "Campbell Soup", "Campbell Soup"],
	"lastLocation": {
		"lat": 162.30,
		"long": 66.43
	}
}

4 - PUT or PATCH /survivor/{id}/location - Updates a survivor location

{
	"location": {
		"lat": 16.7,
		"long": 152.32 
	}
}

5 - PUT or PATCH /survivor/{id}/report - Report a infection (Called 5 times for a given survivor will mark him as infected)

6 - PUT or PATCH /survivor/trade - Trade resources between survivors

{ 
	"seller": {
		"id": "5e86182669216b8bb56f62a3",
		"items": [
			{"name": "Fiji Water", "amount": 1},
			{"name": "First Aid Pouch", "amount": 1}
		]
	},
	"buyer": {
		"id":"5e86185169216b8bb56f62a4",
		"items": [
			{"name": "Campbell Soup", "amount": 2}
		]
	}
} 

trz's People

Contributors

luizfilipe avatar

Watchers

James Cloos 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.