π¨π¨π¨π¨π¨π¨π¨π¨π¨π¨π¨π¨π¨π¨π¨π¨π¨π¨π¨π¨π¨π¨π¨π¨π¨π¨
This server is obsolete and unsupported. It is here only for
historical purposes.
π¨π¨π¨π¨π¨π¨π¨π¨π¨π¨π¨π¨π¨π¨π¨π¨π¨π¨π¨π¨π¨π¨π¨π¨π¨π¨
Note: The most stable version of this server is the master branch. "dev" is marked as default to prevent accidental pushes to the master branch.
Server API Reference Documentation
You will need:
For development, you may also need:
- Protocol Buffers (notably,
protoc
- Run
make
(will generate "./FindMyDevice")
- For Production level installs, you will need to also run:
make build-prod
This will create a ./static/dist/ directory containing prebuild items.
- Modify config.ini to reflect your system and preferences.
GOPATH
needs to be set to the root install directory. e.g.
./runserver.bash
The FindMyDevice binary exposes 3 arguments to manage your schema changes.
--ddlcreate "change description" --ddlupgrade --ddldowngrade "SHA revision" --ddllog
All DDL changes are kept in subdirectories under sql/patches
with a SHA1 hash and the change description in the directory name.
Each patch directory contains : - upgrade.sql - downgrade.sql.orig (optional) - prev.txt - description.txt
Any other files are ignored.
The upgrade.sql script is used for processing version upgrades of the DDL.
A downgrade.sql.orig file is added to the patch directory, if you do not rename it to downgrade.sql, no downgrade is defined downgrades will halt at this version.
prev.txt keeps track of the previous version that this patch is a child of. This prevents merging of multiple branches where simultaneous branches may cause multiple head database versions. In the case of multiple heads, an upgrade will abort.
description.txt includes the comment which is passed to --ddlcreate
# Checkout project into proper workspace
export GOPATH=~/FindMyDevice-workspace
git clone git@github.com:mozilla-services/FindMyDevice.git $GOPATH/src/github.com/mozilla-services/FindMyDevice
cd $GOPATH/src/github.com/mozilla-services/FindMyDevice
# Restore current deps to workspace
godep restore
# Add your new dep
go get github.com/mozilla-services/heka/client
# Save deps
godep save ./...
Then, commit Godeps.json
and Godeps/_workspace/src/github.com/mozilla-services/heka/
.
For instructions on flashing your phone to use a custom Find My Device server, see Custom FMD Server.