Giter Site home page Giter Site logo

marko-architect-todomvc's Introduction

Marko + Architect + TodoMVC

Sample app of using Marko with Architect and TodoMVC.

Getting Started

Before running the initial creation process, ensure that you update the .arc configuration file to write to the bucket that you want. The bucket will automatically be created, but it must have a unique name.

...
@plugins
arc-plugin-marko
  pages ./src/html/get-index/page.marko
  bucket MY_UNIQUE_BUCKET_NAME_HERE

Additionally, you should update the package.json scripts to use the AWS_PROFILE and AWS_REGION that you wish to deploy with. After updating these configuration options, you can now create the AWS resources.

This command creates all required AWS resources and deploys your project:

npm run create

Deploy

Additional deploys of your project after the initial creation step can be done using the following command:

npm run deploy

Start Local

Run the project locally. This command should only be run after running npm run create.

npm start

How?

Marko can be easily run on AWS Lambda. We first run a prebuild of our page. The prebuild step uses lasso and lasso-s3-writer to write all bundles of JavaScript and CSS as well as static assets to Amazon S3. It then rewrites your page and creates a static cache using the public S3 URLs returned. We then precomile all Marko pages using the npm run compile-templates command, which walks the directory tree, finds all Marko templates, and compiles them. By doing this, we do not have to perform any compilation step in Lambda.

After the build, we use Architect to easily deploy the application to AWS Lambda.

marko-architect-todomvc's People

Contributors

austinkelleher avatar

Watchers

James Cloos avatar Victor Dudochkin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.