Coder Social home page Coder Social logo

smart-heating-server's Introduction

smart-heating-server Build Status

This is the repository for the server part of the Distributed System Laboratory project An Infrastructure for Smart Residential Heating Systems:

The server is a RESTful service designed to store and share temperature values and user preferences.

API design

There are two different API responses for successful GET requests: resource collections and resource representations.

  • Resource collections and resource representations: Resource collections list resource representations. Collections are referenced per URL. Resources are referenced by including their representation.

  • URL fields are identified by the name url are the suffix _url. Resource representations contain their own URL in the field url.

Setup instructions

Setup a virtual or dedicated server based on Ubuntu Linux 14.04 LTS and enter the following commands in a terminal:

# Install dependencies
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install git python-virtualenv python3-pip
# Install code into home directory
cd ~
git clone https://github.com/spiegelm/smart-heating-server
# Setup virtualenv
virtualenv -p python3 env
. ~/env/bin/activate
# Check for python version >=3.4.0
python --version
# Install requirements, setup database and start server
cd ~/smart-heating-server/
pip install -r requirements.txt
./manage.py migrate
# Run server on port 8000
./manage.py runserver 0.0.0.0:8000
# Test that server is accessible via browser
# Kill server: CTRL-C

Server Management

# Start server in the background using nohup
./scripts/restart_server.sh
# Kill background server
./scripts/kill_server.sh

# To get the newest code from the repository:
cd ~/smart-heating-server
git pull
./scripts/restart_server.sh

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.