0.8.0 • Published 4 years ago

codelight-react-component v0.8.0

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

codelight-react-component

Codelight Component

NPM JavaScript Style Guide

Install

npm install --save codelight-react-component

Usage

import React from 'react'

import Codelight from 'codelight-react-component'
import 'codelight-react-component/dist/index.css'
import 'bootstrap/dist/css/bootstrap.css'

const PUBLIC_KEY = '********'
const USER_ID = '********'

const App = () => {
  return (
    <Codelight
      publicKey={PUBLIC_KEY}
      userID={USER_ID}
      requiredSuccessTime={3} // Required success time to pass detection step, Default: 3
      limitDetectTime={15} // Limit time for detection (unit: seconds),  Default: 20 seconds
    />
  )
}

export default App

Enviroment variables

You need to add these constants in your .env file to call api from server

REACT_APP_CODELIGHT_NODE_AI_SERVER=
REACT_APP_HMAC=
REACT_APP_FACE_API_MODELS_PATH=

Codelight will provide you the value of these variables

License

MIT © codelight