Skip to content

Commit

Permalink
Update to Node 14
Browse files Browse the repository at this point in the history
  • Loading branch information
hughevans committed Feb 24, 2021
1 parent a3650d8 commit 0be6dfc
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 49 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

# [Choice] Node.js version: 14, 12, 10
ARG VARIANT=12
ARG VARIANT=14
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:${VARIANT}

# [Optional] Uncomment this section to install additional OS packages.
Expand Down
9 changes: 7 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"build": {
"dockerfile": "Dockerfile",
// Update 'VARIANT' to pick a Node version: 10, 12, 14
"args": { "VARIANT": "12" }
"args": { "VARIANT": "14" }
},

// Set *default* container specific settings.json values on container create.
Expand All @@ -12,7 +12,12 @@
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": ["dbaeumer.vscode-eslint", "mhutchie.git-graph", "amazonwebservices.aws-toolkit-vscode", "equinusocio.vsc-material-theme"],
"extensions": [
"dbaeumer.vscode-eslint",
"mhutchie.git-graph",
"amazonwebservices.aws-toolkit-vscode",
"equinusocio.vsc-material-theme"
],

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
Expand Down
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodejs 14.15.4
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This project is set up and deployed using [AWS CDK](https://docs.aws.amazon.com/

## Development

This project requires [Node.js 12.x](https://nodejs.org/en/download/releases/) and that you have [AWS credentials](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html) configured in order to deploy.
This project requires [Node.js 14.x](https://nodejs.org/en/download/releases/) and that you have [AWS credentials](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html) configured in order to deploy.

- `npm install`
- `npm run test`
Expand Down
49 changes: 9 additions & 40 deletions form/README.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,15 @@
# Getting Started with Create React App
# EDM preferences form

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
This form is built (using [Create React App](https://github.com/facebook/create-react-app)) and then included in the Jekyll site:

## Available Scripts

In the project directory, you can run:

### `npm start`

Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

The page will reload if you make edits.\
You will also see any lint errors in the console.

### `npm test`

Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.

### `npm run build`
https://parksaustralia.gov.au/edm-preferences/

Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.
Once the site is rebuilt in Gatsby/React then this for code can move into the main site repository.

The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!

See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.

### `npm run eject`

**Note: this is a one-way operation. Once you `eject`, you can’t go back!**

If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.

You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.

## Learn More
## Available Scripts

You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
- `npm start`
- `npm test`
- `npm run build`

To learn React, check out the [React documentation](https://reactjs.org/).
Currently we copy the contents of `build` folder to [this location](https://github.com/envris/parksaustralia/tree/master/edm-preferences/form).
4 changes: 2 additions & 2 deletions lib/stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ export class Stack extends cdk.Stack {
const getHandler = new lambdaNode.NodejsFunction(this, "GetHandler", {
environment,
memorySize: 3008,
runtime: lambda.Runtime.NODEJS_12_X,
runtime: lambda.Runtime.NODEJS_14_X,
timeout: cdk.Duration.seconds(15),
tracing: lambda.Tracing.DISABLED,
});

const postHandler = new lambdaNode.NodejsFunction(this, "PostHandler", {
environment,
memorySize: 3008,
runtime: lambda.Runtime.NODEJS_12_X,
runtime: lambda.Runtime.NODEJS_14_X,
timeout: cdk.Duration.seconds(15),
tracing: lambda.Tracing.DISABLED,
});
Expand Down
9 changes: 7 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"@types/jest": "26.0.20",
"@types/node": "10.17.50",
"aws-cdk": "1.91.0",
"aws-sdk": "2.827.0",
"esbuild": "0.8.31",
"jest": "26.6.1",
"lambda-local": "1.7.4",
Expand Down

0 comments on commit 0be6dfc

Please sign in to comment.