Skip to content

Commit

Permalink
browser based example
Browse files Browse the repository at this point in the history
  • Loading branch information
mapopa committed Feb 17, 2014
1 parent 59448a8 commit 9158b57
Show file tree
Hide file tree
Showing 3 changed files with 101 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/examples/README
@@ -0,0 +1,10 @@
Install webtcp
Clone the repo
git clone https://github.com/yankov/webtcp

Install dependencies
cd webtcp
npm install

Run WebTCP server
cd examples && node server
26 changes: 26 additions & 0 deletions lib/examples/browser_client.html
@@ -0,0 +1,26 @@
<script src="./webtcp-0.0.1.min.js"></script>
<script src="../browser-index.js"></script>
<script>

var tcp = new WebTCP('127.0.0.1', 9999);
var fb = require("node-firebird");
fb.attach(
{
host: '127.0.0.1',
database: 'database.fdb',
user: 'SYSDBA',
port: '3050',
password: 'masterkey'
},
function(err, db){
if (err) {
console.log(err.message);
} else {
database = db;
console.log("connected");
}
}
);


</script>

0 comments on commit 9158b57

Please sign in to comment.