Index: web/LICENSE =================================================================== --- web/LICENSE (nonexistent) +++ web/LICENSE (revision 5519) @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016 Kalman Keri + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. Index: web/Makefile =================================================================== --- web/Makefile (nonexistent) +++ web/Makefile (revision 5519) @@ -0,0 +1,7 @@ + +all: testclient + +testclient: phony + cd testclient && npm run build + +phony: Index: web/README =================================================================== --- web/README (nonexistent) +++ web/README (revision 5519) @@ -0,0 +1,39 @@ + +Prerequisites +------------- + +Install node.js v4.x.x or higher (v6.x.x is recommended). +Install the npm package manager. + +Make sure that node.js can be invoked by the name 'node'. + +On Debian-based distributions you can install the `nodejs-legacy` package +that symlinks `nodejs` to `node`. + +Run the ./configure script. It is totally different from a usual configure +script but its role is similar: prepares for build. + + +Running the testserver +---------------------- + +make +cd testserver +npm start + +Open your browser and enter the following url: + +http://localhost:3000/test + + +Drawing Test + +Currently test files for the remote protocol (the ones with .remote +extension) are loaded from ./testdata. gzipped files are not supported. + +To specify another test file for the drawing test you should edit +testclient/draw.js. Change the following function call near line 7: + +drawRemoteFile("../testdata/netlist.pcb.remote"); + +For more info read testserver/README and testclient/README. Index: web/client/package.json =================================================================== --- web/client/package.json (revision 5518) +++ web/client/package.json (revision 5519) @@ -14,6 +14,6 @@ "browserify": "^13.1.1" }, "scripts": { - "update": "watchify draw.js -o draw-bundle.js", + "update": "watchify draw.js -o draw-bundle.js" } } Index: web/configure =================================================================== --- web/configure (nonexistent) +++ web/configure (revision 5519) @@ -0,0 +1,18 @@ +#!/bin/sh + +cd client +npm install +cd .. + +cd protocol +npm install +cd .. + +cd testclient +npm install +cd .. + +cd testserver +npm install +cd .. + Property changes on: web/configure ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: web/testclient/README =================================================================== --- web/testclient/README (revision 5518) +++ web/testclient/README (revision 5519) @@ -1,7 +1,7 @@ testclient ========== -Client side files for testing a websocket server in a compatible browser. +Client side files for testing the remote protocol. These files should be served by the tested webserver. The client is logging to the javascript console, so it's advisable to open it @@ -13,8 +13,8 @@ index.html - links for all test pages. -Note: if you start the node.js test server (../testserver) these files can be -found in the `/test` directory. +Note: if you are using the node.js test server (../testserver) these files +can be found in the `/test` directory. The server echo socket Index: web/testclient/package.json =================================================================== --- web/testclient/package.json (nonexistent) +++ web/testclient/package.json (revision 5519) @@ -0,0 +1,20 @@ +{ + "name": "pcb-rnd-testclient", + "version": "0.0.1", + "description": "Test client for the pcb-rnd remote HID protocol", + "homepage": "http://repo.hu/projects/pcb-rnd/", + "private": true, + "license": "MIT", + "author": { + "name": "Kalman Keri", + "email": "kk@metamaya.org" + }, + "dependencies": {}, + "devDependencies": { + "browserify": "^13.1.1" + }, + "scripts": { + "update": "watchify draw.js -o draw-bundle.js", + "build": "browserify draw.js > draw-bundle.js" + } +} Index: web/testserver/README =================================================================== --- web/testserver/README (revision 5518) +++ web/testserver/README (revision 5519) @@ -4,13 +4,6 @@ Simple node.js webserver for web client testing. -Preconditions -------------- -Install node.js v4.x.x or higher (v6.x.x is recommended). -Install the npm package manager. -Run `npm install` in the testserver directory. - - Starting the server ------------------- To start the server enter the `testserver` directory and use the `npm start` @@ -25,10 +18,14 @@ Static files ------------ -Static files are served from the `client`, `protocol` and `testdata` -directories. +Static files are served from the following directories. +/ -> client +/test -> ../testclient +/protocol -> ../protocol +/testdata -> ../testdata + Websockets ----------