Skip to content

yellowful/sbbackend

Repository files navigation

Back End of Celebrity Recognization AI Single Page Application

這個 SPA 中文的架構和說明

This is the back-end open source code of CeleRec SPA, which can recognize celebrities.

The source code of front end.

Installation

You can download or clone this project from git hub.

    git clone https://github.com/yellowful/sbbackend.git

Install it:

    npm install

Register

Sign up Clarifai for free to get an API key in advance.

Setting

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 Relational Database

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

Run the app when you are developing locally:

  npm run start:dev

License

The code used for generating this web site are licensed as MIT.

Releases

No releases published

Packages

No packages published