File upload API to aws S3
API - Stack:
Develop | [pending] |
Homolog | [pending] |
Production | [pending] |
$ npm install
# windowsenv
$ npm install -g cross-env
API configuration on .env file.
DEVS: Create .env file on root folder.
HOST=localhost
PORT=3020
SSL=false
JWT_SECRET=teste
JWT_ISSUER=lucashamaguchi
JWT_EXPIRE=12h
# AWS S3
AWS_ACCESS_KEY=
AWS_SECRET_ACCESS_KEY=
AWS_S3_BUCKET=textractpipeline-documentsbucket9ec9deb9-382h7lq1xrh
AWS_S3_TMP_BUCKET=bucket-tmp
# build tsc
$ npm run build
# development
$ npm run dev
# production
$ npm run start
Starting Xhelpers Hapi server API
Settings API: Mongoose enabled;
๐ Connected to mongodb: 5.8.11/mongodb+srv://admin:.........
Settings API: Sequelize disabled;
Settings API: SSL disabled;
Settings API: SSO disabled;
====================================================================================================
๐ Server running at: http://localhost:3020/api/
๐ Server docs running at: http://localhost:3020/api/documentation
====================================================================================================
Routing table:
๐ get - /api/documentation
๐ get - ๐ /api/files
๐ get - /api/documentation/swagger.json
๐ post - ๐ /api/files/upload
====================================================================================================
$ Pending
[Pending]
[Pending]