Skip to content

Commit 2cd3331

Browse files
author
Zeno Rocha
committed
Merge pull request eduardolundgren#24 from zenorocha/server
Added an easy way to start a local server. Fixed eduardolundgren#23
2 parents 2ce8d6e + 00a63ab commit 2cd3331

4 files changed

Lines changed: 39 additions & 2 deletions

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
.DS_Store
1+
.DS_Store
2+
node_modules

Gruntfile.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
module.exports = function(grunt) {
2+
3+
grunt.initConfig({
4+
pkg: grunt.file.readJSON('package.json'),
5+
connect: {
6+
server: {
7+
options: {
8+
port: 9001,
9+
keepalive: true
10+
}
11+
}
12+
}
13+
});
14+
15+
grunt.loadNpmTasks('grunt-contrib-connect');
16+
grunt.registerTask('server', ['connect']);
17+
18+
};

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ videoCamera.track({
3838

3939
[Check the full code of this Hello World example.](https://github.com/eduardolundgren/tracking.js/blob/master/examples/hello_world.html)
4040

41+
> **Note:** if you want to run tracking.js examples locally, you're going to need a local server, since `file:///` doesn't work with `getUserMedia()` in some browsers.
42+
43+
> 1. Install Grunt and its dependencies: `npm install .`
44+
> 2. Run a local server: `grunt server`
45+
> 3. Go to: `http://localhost:9001` and have fun :)
46+
4147
## About
4248

4349
It brings to web elements tracking techniques of a real scene captured by the camera, through natural interactions from object tracking, color markers, among others, allowing the development of interfaces and games through a simple and intuitive API.
@@ -52,4 +58,4 @@ Created by Eduardo Lundgren, one of the creators of AlloyUI, involved in many op
5258

5359
* Eduardo Lundgren
5460
* Thiago Pereira
55-
* Zeno Rocha
61+
* Zeno Rocha

package.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"name": "tracking.js",
3+
"title": "tracking.js",
4+
"description": "Augmented Reality JavaScript Framework",
5+
"author": "Eduardo Lundgren",
6+
"homepage": "https://github.com/eduardolundgren/tracking.js/",
7+
"version": "0.0.1",
8+
"dependencies": {
9+
"grunt": "~0.4.0",
10+
"grunt-contrib-connect": "0.2.0"
11+
}
12+
}

0 commit comments

Comments
 (0)