This app uses React for the frontend, which allows you to upload a file, and then use the Fine Uploader API to upload the file to Azure. To install all dependencies:
yarn
or npm i
This app uses Go for the backend, which is responsible for creating signed urls to access the Azure Storage Service. To install all dependencies:
go get ./...
Do one of the following to set the necessary environment variables:
- REACT_APP_SAS_CONTAINER
- REACT_APP_SAS_SERVICE
- SAS_SERVICE
- SAS_PASSWORD.
- Create a
.env.local
file in the root directory - Create a
.env
file in the api/ directory - Write the following in
.env.local
:
REACT_APP_SAS_SERVICE=(my service name)
REACT_APP_SAS_CONTAINER=(my container name)
- Write the following in
api/.env
SAS_CONTAINER=(my contianer name)
SAS_PASSWORD=(my access key)
- Build the react app:
yarn build
ornpm run build
- Run the react app:
npx serve -s build
- Build the go server:
cd api && go build
- Run the go server:
./api