Giter Site home page Giter Site logo

node-fprint-server's Introduction

node-fprint-server

HTTP server for libfprint to enroll & identify remotely. Users can be retrieved, registered, updated and deleted using HTTP, identify events are emitted using Socket.io.

This project is not meant to be used as a Node.js module but rather as a standalone application.

Installation

Make sure you have the Linux packages libfprint0 and libfprint-dev installed.

Execute in your console:

git clone https://github.com/WeeJeWel/node-fprint-server
cd node-fprint-server
npm install
node server.js --db /writable/path/to/database.json --device "Name of your fingerprint device" --port 4444

e.g. when running on a Raspberry Pi with a Microsoft Fingerprint Reader:

node server.js --db /home/pi/fingerprintserver.json --device "Digital Persona U.are.U 4000/4000B/4500"

Hint: run the server once to get a list of devices.

HTTP API

Get all users

Append ?fingerprint=1 to get the binary fingerprint data as well.

GET /api/user

Get a single user

GET /api/user/:id

###Create a user ### After invoking this call, the user must place a finger on the Fingerprint Reader Device.

The body is a 'data' object, where additional information can be placed such as a name.

POST /api/user

{
	"name": "Chares"
}

Edit a user's data object

PUT /api/user

{
	"name": "Charles"
}

Delete a user

DELETE /api/user/:id

Socket.io API

Also see ./examples/client.js

	socket
	
		// when a user is identified (finger recognized)
		.on('identify', function( userId, userData ){
			console.log('[on identify]', 'userId:', userId, 'userData:', userData );
		})
		
		// when a user is added
		.on('user-add', function( userId, userData ){
			console.log('[on user-add]', 'userId:', userId, 'userData:', userData );
		})
		
		// when a user is updated
		.on('user-update', function( userId, userData ){
			console.log('[on user-update]', 'userId:', userId, 'userData:', userData );
		})
		
		// when a user is deleted
		.on('user-delete', function( userId ){
			console.log('[on user-delete]', 'userId:', userId );
		})

node-fprint-server's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.