Simple application with frontend and backend that says Hello and remembers everybody that it greets.
- Go to the backend directory
$ npm init -y
- Copy the file template.yml from base into your directory
$ cp base/template.yml template.yml
- Create a hello directory in your project where your code will be.
$ mkdir hello
$ cd hello
$ npm init -y
- Copy the handler.js file from base to this directory
$ cp ../base/handler.js handler.js
- Deploy backend, do this from the backend directory
$ sam deploy --guided
Put the right name to your application and accept all defaults Wait for it to deploy.
- Try it in POSTMAN, you will get an URL back
- Go to the client directory and install all dependencies
$ npm install
- Run the application
$ npm start
- Replace App.js with the one in the base folder
$ cp base/App.js src/App.js
- Copy the aws-config into the project and add the right configuration to it. You can get the values from the output of deploying the backend.
$ cp base/aws-config_SAMPLE.js src/aws-config.js
- Ready to try :)