https://github.com/serayuzgur/marko-example
An example project with markojs and apollo-fetch.
https://github.com/serayuzgur/marko-example
apollo-fetch graphql markojs
Last synced: 20 days ago
JSON representation
An example project with markojs and apollo-fetch.
- Host: GitHub
- URL: https://github.com/serayuzgur/marko-example
- Owner: serayuzgur
- Created: 2018-02-12T13:32:53.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-05-05T13:54:06.000Z (almost 7 years ago)
- Last Synced: 2025-03-23T23:26:23.336Z (about 1 month ago)
- Topics: apollo-fetch, graphql, markojs
- Language: HTML
- Homepage:
- Size: 1010 KB
- Stars: 5
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Marko Example.
An example project with markojs and apoll-fetch.
This repo extends [`marko-starter`](https://github.com/marko-js/marko-starter).
Aims to demonstrate a real-life demo.* [marko](https://github.com/marko-js/marko) for ui and configuration (marko-cli).
* [apollo-fetch](https://github.com/apollographql/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.```bash
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
```bash
npm install
```## Starting the server
```bash
npm start
```Start the server in production mode (minification enabled, etc.):
```bash
NODE_ENV=production npm start
```## Build a static site
Build the project in production mode:```bash
npm run build
```By default, the generated static site will be placed in `dist/`.