Skip to content

kennithnichol/face-recognition-api

Repository files navigation

Face Recognition API

The Node.js server component for the Face Recognition App.

To run:

  1. Clone the repo
  2. Set DATABASE_URL environement variable to your postgres:// connection string.
  3. Set the Environment variable CLARIFAI_KEY to your API Key from Clarifai
  4. run npm install
  5. run npm start

Use the Face Recognition app to interact with the API, or build your own app.

Endpoints

  • GET / List users
  • POST /signin (:email,:password) Validate a user
  • POST /register (:email, :name, :password) Register a new user
  • GET /profile/:id (:user.id) Get the profile of a specified user
  • PUT /image (:user.id) Increment the user.entries value for the indicated user
  • GET /imageurl (:input) Detect faces in the specified image URL

By default, the server listens on port 3000 unless a process.env.PORT is found

DB Requirments

You will need a PostgreSQL server (or change it if you wish).

Database tables required are:

CREATE TABLE users (
	id serial PRIMARY KEY,
	name varchar(100),
	email text UNIQUE NOT NULL,
	entries bigint DEFAULT 0,
	joined timestamp NOT NULL
);

CREATE TABLE login (
	id serial PRIMARY KEY,
	email text UNIQUE NOT NULL,
	hash varchar(100) NOT NULL
);

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published