Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sigmasoldi3r/primal
https://github.com/sigmasoldi3r/primal
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/sigmasoldi3r/primal
- Owner: sigmasoldi3r
- Created: 2024-02-16T11:41:11.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-02-18T21:30:17.000Z (11 months ago)
- Last Synced: 2024-05-20T15:12:08.245Z (8 months ago)
- Language: TypeScript
- Size: 35.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
PrimalA hack-though style development web server, using modern technologies in an old
fashion.## Running
- Download (Or build) primal executables.
- Create a `www` (or whatever you like).
- Create a `index.eta` file inside, place `hey
`(Or something else).
- (Optional) Create other some `.eta` and static files there.
- Run:```sh
./primal --root www --port 8080
```Then go to `http://localhost:8080` and see the results.
### The template language
Primal relies on [Eta template language](https://eta.js.org/) to render the
pages, see their documentation for specific language quirks and syntax.But as a rule of thumb, you'll use:
- Javascript as programming language (Embed in the view file)
- And the function `await it.require()` to import Deno modules.An example:
```ejs
<%const { Database } = await it.require("https://deno.land/x/[email protected]/mod.ts");
const db = new Database("test.db");const [version] = db.prepare("select sqlite_version()").value();
%>
Database test
Installed SQLite3 version = <%= version %>
```