Welcome to the Tiqtok API! Our stack is primarily built on a collection of services defined and governed by layers. Those layers are currently defined as follows:
- Security - preceeds any route processing. A nice place for XSS filtering, basic input validation, etc...
- Router - interprets request based on URL and HTTP verb, parses input vars and redirects to a controller.
- Controller - a gateway sitting between routes and models - primarily responsible for:
a.) authenticating user (using an authentication service)
b.) performing an action
c.) returning a response (using a response service) - Model - gateway between controller and database. Responsible for:
a.) type validation against input
b.) performing a database action
c.) returning a database object
- Make an Atlas account: visit https://atlas.hashicorp.com/ and setup a new account; remember your 2. username and password!
- Install Vagrant: visit http://www.vagrantup.com/downloads.html and install the correct version
- Install VirtualBox for your OS: visit https://www.virtualbox.org/wiki/Downloads and install the correct version for your host OS. Eg., if you use OSX, install the Virtualbox for OSX Hosts
We are using vagrant to handle our local deployment. Launching vagrant will spin up a virtual box on your machine, load it with ubuntu 14, install node, nginx, etc, and run all other necessary provisioning to get TiqTok up and running.
git clone https://gitlab.com/tiqtok-resources/tiqtok-api.git
cd tiqtok-api
vagrant up
vagrant ssh
cd /vagrant
node index.jsOnce vagrant is complete, you can navigate to
http://localhost:8787to see the tiqtok api in action.
npm install -g mocha
mocha