Code Monkey home page Code Monkey logo

file-uploader-service's Introduction

file-uploader-service

File uploader service for the platform

Currently the platform supports uploading

  • CSV

Prerequisite

You would require the following to be installed in your system

Installation

Add the following variables to your .bashrc or .zshrc in your home directory

export VAULT_ROOT_KEY='get-the-vault-root-token-from-development-team'
export CUTTLE_AI_CONFIG_VAULT_TOKEN=$VAULT_ROOT_KEY
export CUTTLE_AI_CONFIG_VAULT_ADDRESS='https://vault.cuttle.ai'
export CUTTLE_AI_CONFIG_VAULT_DEFAULT_PATH='cuttle-ai-development'
git clone https://github.com/cuttle-ai/file-uploader-service
cd file-uploader-service
sh setup.sh
cd ../brain-frontend
sudo npm install -g @angular/cli
npm i

Usage

Navigate into the project directory and run the following command

cd ../auth-service && go run main.go

Open another terminal session in the project directory and run the following command

cd ../brain-frontend && npm start

Open another terminal session in the project directory and run the following command

go run main.go

Now open the browser and navigate to localhost:4200. Authenticate yourself using the Google login offered by the platform. Open Developer Tools(Browser) -> Application -> Cookies , Use the cookie value of auth-token for testing API

Environment Variables

Enivironment Variable Description
PORT Port on to which application server listens to. Default value is 8081
RPC_PORT RPC Port on to which application server listens to. Default value is 8082
RESPONSE_TIMEOUT Timeout for the server to write response. Default value is 100ms
REQUEST_BODY_READ_TIMEOUT Timeout for reading the request body send to the server. Default value is 20ms
RESPONSE_BODY_WRITE_TIMEOUT Timeout for writing the response body. Default value is 20ms
PRODUCTION Flag to denote whether the server is running in production. Default value is false
SKIP_VAULT Skip loading the configurations from vault server. Default value is false.
IS_TEST Denoting the run is test. This will load the test configuration from vault
MAX_REQUESTS Maximum no. of concurrent requests supported by the server. Default value is 1000
REQUEST_CLEAN_UP_CHECK Time interval after which error request app context cleanup has to be done. Default value is 2m
DISCOVERY_URL URL of the consul discovery service. Default value is 127.0.0.1:8500
DISCOVERY_TOKEN Token of the consul discovery service
SERVICE_DOMAIN Domain on which the service is running for discovery with respect to other services. Default Value is 127.0.0.1

Author

Melvin Davis

file-uploader-service's People

Contributors

melvinodsa avatar

Watchers

 avatar  avatar  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.