ember-aws-ehipster
v0.6.11
Published
Attempt to build a complete web application using serverless architecture on AWS
Downloads
15
Maintainers
Readme
ember-aws-ehipster
This addon simplify the generation of code for model build with JDL Studio https://start.jhipster.tech/jdl-studio/ It also guide you to set up a JSON-API server on top of AWS API Gateway, Lambda and DynamoDB. Since v0.6, it also interact with Cognito to deal with authentication.
It could also be seen as a starter for setting up Mirage, allowing the developper to build a full working application (using mock data) entirely running on the client. Once the development is over, the persistance can be delegated to an AWS API Gateway using a lambda function storing objects in DynamoDB.
Complete code is available at https://gitlab.ippon.fr/bpinel/ember-aws-ehipster
A full tutorial is available on the Ippon Blog :
- in english: https://blog.ippon.tech/a-guinea-pig-in-the-cloud/
- in french: https://blog.ippon.fr/2019/03/19/un-cochon-dinde-dans-le-cloud/
The previous tutorial works perfectly with version < 0.6. For version >= 0.6, you just have to configure your Cognito information in environment.js.
Installation
ember install ember-aws-ehipster
Usage
Generating the application
For generating an application, first use the standard command :
ember new test-ember-aws-ehipster --no-welcome
cd test-ember-aws-ehipster
ember install ember-aws-ehipster
You must notice that the application will not be able to run until you fill the two following conditions:
- Generate at least one entity using the jdl-importer blueprint (see below)
- Give your information about POOL_ID, USER_POOL_ID CLIENT_ID and REGION for Cognito (a full section on Cognito will be given later)
Generating simple entities
Then generate a few entity through provided blueprints using the same syntax as the model blueprint :
ember g entity-factory blog title:string content:string order:number isVisible:boolean
ember g entity-factory post title:string content:string order:number visible:boolean
Generating a complete model
You can also use the JDL-Studio (https://start.jhipster.tech/jdl-studio/) provided by JHipster to design your entities and their relationships. After downloading the JDL file simply type the command:
ember g jdl-importer <jdl-file>
Using a JSON API server on AWS for backend
Just read the README file in the cloud/terraform directory to set up the right infrastructure on AWS. Then got to the API Gateway interface to retrieve the URL for your staging environnement. You should need to start ember in proxy mode to take benefit of this backend storing data in DynamoDB
ember s --proxy <url staging>
Contributing
Installation
git clone <repository-url>
cd ember-aws-ehipster
npm install
Linting
npm run lint:js
npm run lint:js -- --fix
Running tests
ember test
– Runs the test suite on the current Ember versionember test --server
– Runs the test suite in "watch mode"ember try:each
– Runs the test suite against multiple Ember versions
Running the dummy application
ember serve
- Visit the dummy application at http://localhost:4200.
For more information on using ember-cli, visit https://ember-cli.com/.
License
This project is licensed under the MIT License.