Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zkochan/gizi
A static server that autoupdates itself from a Git repository.
https://github.com/zkochan/gizi
Last synced: 10 days ago
JSON representation
A static server that autoupdates itself from a Git repository.
- Host: GitHub
- URL: https://github.com/zkochan/gizi
- Owner: zkochan
- License: mit
- Created: 2015-04-25T16:16:30.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-11-25T19:49:41.000Z (about 8 years ago)
- Last Synced: 2024-11-25T08:42:40.313Z (28 days ago)
- Language: JavaScript
- Homepage:
- Size: 28.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Gizi [![Dependency Status](https://david-dm.org/zkochan/gizi/status.svg?style=flat)](https://david-dm.org/zkochan/gizi) [![Build Status](https://travis-ci.org/zkochan/gizi.svg?branch=master)](https://travis-ci.org/zkochan/gizi) [![npm version](https://badge.fury.io/js/gizi.svg)](http://badge.fury.io/js/gizi)
=====Gizi is a static server that autoupdates itself from a Git repository.
## How to install it?
```
$ npm install -g gizi
```# How does it work?
The static server is running from the moment when the **gizi serve** command is executed in the console. The files that are served are in the **site** directory.
At startup, Gizi clones the repository specified in **.gizi.yml** to the **src** subfolder. When all the repo files are created, Gizi runs a set of commands that are specified in the downloaded project's package.json. The commands are supposed to create the resources for the static server and write them to the build folder. The build folder name is also specified in package.json. When all the commands are executed, Gizi copies the files from the build folder to the static server.
Next, Gizi listens to changes in the Git repository. When a new commit appears in the branch which it listens to, Gizi updates the files in the local file system from the remote repository, executes the commands and updates the files on the server.
# How to configure it?
1. Create a **.gizi.yml** configuration file in the folder where the static server will be hosted.
2. Run ``gizi serve`` in that folder.Gizi will clone the repositories specified in the config file to a subfolder called **src** and start a static server that will serve files from a subfolder called **site**.
A .gizi.yml config file can look like this:
``` yaml
port: 9595
ip: 0.0.0.0
sources:
- name: gizi-sample
gitUrl: https://gitlab.com/zkochan/gizi-sample.git
buckets:
- name: sample
source: gizi-sample
branch: master
- name: lala
source: gizi-sample
branch: lala
```The Git project's package.json has to contain a section with Gizi configs. E.g.:
``` json
"gizi": {
"buildPath": "./_build",
"cmds": {
"sample": [
["rm", "-rf", "node_modules/"],
["npm", "install"],
["gulp"]
]
}
}
```License
========The MIT License (MIT)