0.0.1-beta1 • Published 2 years ago

candyapple v0.0.1-beta1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

A sweet Express templating engine with a WASM core.

About

Candy Apple is a templating language and engine designed to be used with the Express web framework. Candy Apple depends heavily on Grotto, a Rust WASM core for manipulating pure data functionally.

🚴 Usage

npm i candyapple

Then add it as an Express view engine

const {engine} = require('candyapple')
const express = require('express')
const app = express()
const port = 3030

app.engine('html', engine);
app.set('views', './examples')
app.set('view engine', 'html')

app.get('/', (req, res) => {
    try {
        res.render('index', { title: "Grotto!" })
    } catch (e) {
        console.error(e);
    }
})

app.get('/test', (req, res) => {
    res.send('hi')
})

app.listen(port, () => {
    console.log(`Example app listening on port ${port}`)
})
0.0.1-beta1

2 years ago

0.0.1-beta

2 years ago

0.0.1-alpha

2 years ago