This is the back-end open source code of CeleRec SPA, which can recognize celebrities.
You can download or clone this project from git hub.
git clone https://github.com/yellowful/sbbackend.git
Install it:
npm install
Sign up Clarifai for free to get an API key in advance.
When you develop in your local environment, you could try variable command such as:
CLARIFAIAPIKEY=xxxxxxxxxxxxx node smartbrainbackend.js
When you deploy to your back end cloud platform such as Heroku, set the config variables clarifaiApiKey
.
Create two tables via PostgreSQL:
users table:
CREATE TABLE users (
id SERIAL PRIMARY KEY,
name VARCHAR(100),
entries BIGINT DEFAULT 0,
joined TIMESTAMP NOT NULL
);
login table:
CREATE TABLE login (
id SERIAL PRIMARY KEY,
hash VARCHAR(100) NOT NULL,
email TEXT UNIQUE NOT NULL,
);
Run the app when you are developing locally:
npm run start:dev
The code used for generating this web site are licensed as MIT.