HTMS
  • Start
  • Main
    • Installation
    • Config
    • HTMS Files
  • Functions / Events
    • SLoad Event
    • Update Function
    • RemoveCache Function
  • Concepts
    • Static Vars
    • Shared vars [Dev]
  • Commands
    • Import
    • Inject
    • Replace
    • Module
    • Exp [Dev]
  • Tutorials
    • Start using HTMS
    • Using modules
Powered by GitBook
On this page
  • Web
  • Backend (JS)
  1. Main

Installation

PreviousStartNextConfig

Last updated 5 months ago

Web

To use htms add the following line in your head element

<script src="https://htms.fsh.plus/js/v<VERSION>.<TYPE>" type="module" crossorigin="anonymous"></script>
<style>htms{display:none}</style>
<htms>
  Your htms config here
</htms>

<VERSION> will be the version of htms

<TYPE> will be either .js or .min.js

index is the main file, min will have the code minimized, for faster loading and less load on users.

Warning! min only works on stable and previous releases, dev versions may not have one.

Backend (JS)

To add htms to a backend server use the package.

const express = require('express');
const app = express();
const htms = require('server-htms');

app.use(htms)

app.get('/', (req, res) => {
  res.htms('file/path.html')
})
npm i server-htms
yarn add server-htms
pnpm add server-htms
bun add server-htms
server-htms