Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/haoliangyu/create-koop-app
experimental APIs to generate Koop projects
https://github.com/haoliangyu/create-koop-app
api app builder koop koop-cli plugin
Last synced: 29 days ago
JSON representation
experimental APIs to generate Koop projects
- Host: GitHub
- URL: https://github.com/haoliangyu/create-koop-app
- Owner: haoliangyu
- Created: 2019-02-10T19:03:46.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-04-20T21:54:04.000Z (over 5 years ago)
- Last Synced: 2024-08-03T17:14:54.953Z (3 months ago)
- Topics: api, app, builder, koop, koop-cli, plugin
- Language: JavaScript
- Homepage: https://create-koop-app.herokuapp.com/api
- Size: 64.5 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# create-koop-app
Experimental APIs to generate Koop applications and plugins.
This project is based on [@koopjs/cli](https://github.com/koopjs/koop-cli).
Try [https://create-koop-app.herokuapp.com/api/new/app/my-app](https://create-koop-app.herokuapp.com/api/new/app/my-app) for a live demo.
## API
For full details of the API parameter, see the [Koop CLI documentation](https://github.com/koopjs/koop-cli/blob/master/README.md).
### GET /api/new/:type/:name
Create a Koop project with the given type and name and download as a .zip file.
#### Parameters
* **type**: project type
* **name**: project name#### Example
``` bash
# create an app project named "my-app" and download as project.zip
curl -o project.zip ttps://create-koop-app.herokuapp.com/api/new/app/my-app
```### POST /api/new
Create a Koop project based on the input specification and download as a .zip file. A body (project specification) should be sent with the request.
#### Request Body
``` javascript
{
// required, project type
"type": "app",
// required, project name
"name": "my-app",
// optional, project configuration
"config": {},
// optional, an array of Koop plugin type and name
"plugins": [
{ "type": "provider", "name": "@koopjs/provider-github" }
]
}
```#### Example
``` bash
# send a POST request with project specification and download as project.zip
curl -H "Content-Type: application/json" \\
--request POST \\
--data '{ "type": "app", "name": "my-app" }' \\
-o project.zip \\
https://create-koop-app.herokuapp.com/api/new
```## Testing
Running the `npm run start:dev` command will start a test server at `http://localhost:3000`.