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.
- 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.
npm install
npm start
Start the server in production mode (minification enabled, etc.):
NODE_ENV=production npm start
Build the project in production mode:
npm run build
By default, the generated static site will be placed in dist/
.