Skip to content

serayuzgur/marko-example

Repository files navigation

Marko Example.

An example project with markojs and apoll-fetch. This repo extends marko-starter. Aims to demonstrate a real-life demo.

  • marko for ui and configuration (marko-cli).
  • apollo-fetch for easier graphql fetching.

marko

  • All *.marko.js files are auto generated.
  • You can see a detailed overview of the src folder below. Makes easier to see what is necessary.
src/
├── components             # where you put your components
│   ├── page-search.marko  # holds search-box and product-list. coordinates them.
│   ├── product-list.marko # lists products using graph.js
│   ├── search-box.marko   #  :)
│   └── site-layout        # layout from marko-starter with minor changes. 
│       ├── index.marko
│       ├── logo.svg
│       └── style.css
├── data
│   ├── graph.js          # apollo connection codes.
│   └── queries           # where you put  your graph queries
│       └── index.js
└── index.marko           # default route. mounts page-search.

Install

npm install

Starting the server

npm start

Start the server in production mode (minification enabled, etc.):

NODE_ENV=production npm start

Build a static site

Build the project in production mode:

npm run build

By default, the generated static site will be placed in dist/.

About

An example project with markojs and apollo-fetch.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published