@incodelang/templates
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

@incodelang/templates

A Server for storing templates

Installation

Install @incodelang/templates with npm

  npm install @incodelang/templates

Install @incodelang/templates with yarn

  yarn add @incodelang/templates

Usage/Examples

Integrate in your own express.js application

const { templateServer } = require('@incodelang/templats')
const express = require('express')

const app = express();

app.listen(3000, "0.0.0.0");

templateServer({
    app: app
})

Standalone express.js application

const { templateServer, sampleApp } = require('@incodelang/templates')

templateServer({
    app: sampleApp(
        3000, // port [default] = 3000
        "0.0.0.0" // host [default] = "0.0.0.0"
    )
})

API Reference

Upload Template

  GET /api/v1/template/upload
Parameter Type Description
type monaco or blockly The type of the template
name string The name of the template
code string The actual code

Download Template

  GET /api/v1/template/data/templates/{name}.ic

List all Templates

  GET /api/v1/template/data/templates.json

Authors

License

GPL-3.0

Readme

Keywords

Package Sidebar

Install

npm i @incodelang/templates

Weekly Downloads

0

Version

1.0.2

License

GPL-3.0-only

Unpacked Size

42.5 kB

Total Files

14

Last publish

Collaborators

  • mctzock