Skip to content

Commit

Permalink
Add nodemon for development.
Browse files Browse the repository at this point in the history
  • Loading branch information
wparad committed May 20, 2023
1 parent 126cb7c commit 8b78bb2
Show file tree
Hide file tree
Showing 7 changed files with 1,124 additions and 799 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: 14
node-version: 16
registry-url: 'https://registry.npmjs.org'

- name: Install packages
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: 14
node-version: 16
registry-url: 'https://registry.npmjs.org'

- name: Install packages
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
16
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.0",
"fs-extra": "^8.1.0",
"mocha": "^9.2.0"
"mocha": "^9.2.0",
"nodemon": "^2.0.22"
},
"engines": {
"node": ">=14"
Expand Down
7 changes: 6 additions & 1 deletion src/documentsController.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ class DocumentsController {
const isDirectory = documentUri.slice(-1)[0] === '/';
const s3UrlLocation = new S3({ region: regionManager.getExpectedAwsRegion() }).createPresignedPost({
Bucket: bucketId,
// Fields support direct data as form fields and are directly translated to `eq` conditions. For exact matches they can be put here or used in the Conditions.
// Fields: {
// // key: value
// },
Conditions: [
{ acl: 'private' },
{ bucket: bucketId },
Expand All @@ -52,8 +56,9 @@ class DocumentsController {
// Validate s3 specific properties
// {"acl": "public-read"},
// {"success_action_redirect": "http://sigv4examplebucket.s3.amazonaws.com/successful_upload.html"},
// ["starts-with", "$Content-Type", "image/"],
// ["starts-with", "$Content-Type", "image/"], // or ["eq", "$Content-Type", "image/jpeg"],
// {"x-amz-server-side-encryption": "AES256"},
// ['content-length-range', 0, 10000000], // 10 MB

// Set meta data properties
// {"x-amz-meta-uuid": "14365123651274"},
Expand Down
2 changes: 1 addition & 1 deletion template/cloudformationTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ module.exports = {
Role: { 'Fn::GetAtt': ['AWSLambdaExecutionRole', 'Arn'] },
MemorySize: 512,
Timeout: 30,
Runtime: 'nodejs14.x',
Runtime: 'nodejs16.x',
Code: {
S3Bucket: 'document-repository-microservice-public-artifacts-us-east-1',
S3Key: `${packageName}/${lambdaVersion}/lambda.zip`
Expand Down
Loading

0 comments on commit 8b78bb2

Please sign in to comment.