Proof of concept for the Quark.js web framework

Overview

Quark.js Banner

Quark.js Proof of Concept

Proof of concept for the Quark.js web framework.

Examples

Express.js

Implimentation using express.js as a web server:

    import express from 'express'
    import quark from 'quark.js'

    const app = express()

    app.use('/', await quark())

    app.listen(3050, () => {
        console.log('Listening on port 3050')
    })

New Page

Creating a new page:

Hello, World!

` return page }">
    // (root) ./pages/index.page.js
    // Must end with ".page.js"
    // This will automatically resolve to the root of the website (or current directory)

    export default async function Index () {
        let page = html`
            <h1>Hello, World!h1>
        `

        return page
    }

New Part

Creating a new page and new part that can take parameters:

Hello, ${name}!

` return part }">
    // (root) ./parts/helloWorld.part.js
    // Must end with ".part.js"
    // Can be called from any page

    export default function HelloWorld({ name }) {
        let part = html`
            <h1>Hello, ${name}!h1>
        `

        return part
    }
    // (root) ./pages/index.page.js

    export default async function Index () {
        let page = html`
            <div>
                ${HelloWorld({
                    name: 'World'
                })}
            div>
        `

        return page
    }

Dynamic Routes

Creating a new page that is dynamic:

resolved // The resource /posts/1234/comments -> does not resolve // The resource /posts/ -> does not resolve (unless there is an index page under the folder!) export default async function Posts ({ params }) { let page = html`

Post #${params.id}

` return page }">
    // (root) ./pages/posts/[id].page.js
    // Must end with ".page.js"
    // The ID is a parameter that will be included in the URL and will be passed to the page. This
    // also is valid for subfolders. (Ex: /posts/[id]/comments.page.js)
    // The resource /posts/1234 -> resolved
    // The resource /posts/1234/comments -> does not resolve
    // The resource /posts/ -> does not resolve (unless there is an index page under the folder!)

    export default async function Posts ({ params }) {
        let page = html`
            <h1> Post #${params.id}h1>
        `

        return page
    }
You might also like...

The Simple, Secure Framework Developers Trust

The Simple, Secure Framework Developers Trust

@hapi/hapi The Simple, Secure Framework Developers Trust Build powerful, scalable applications, with minimal overhead and full out-of-the-box function

Dec 31, 2022

A framework for real-time applications and REST APIs with JavaScript and TypeScript

A framework for real-time applications and REST APIs with JavaScript and TypeScript

A framework for real-time applications and REST APIs with JavaScript and TypeScript Feathers is a lightweight web-framework for creating real-time app

Jan 1, 2023

🚀 The Node.js Framework highly focused on developer ergonomics, stability and confidence

🚀 The Node.js Framework highly focused on developer ergonomics, stability and confidence

Sponsored by FOSS United is a non-profit foundation that aims at promoting and strengthening the Free and Open Source Software (FOSS) ecosystem in Ind

Dec 31, 2022

:rocket: Progressive microservices framework for Node.js

:rocket: Progressive microservices framework for Node.js

Moleculer Moleculer is a fast, modern and powerful microservices framework for Node.js. It helps you to build efficient, reliable & scalable services.

Jan 4, 2023

MVC framework making it easy to write realtime, collaborative applications that run in both Node.js and browsers

Derby The Derby MVC framework makes it easy to write realtime, collaborative applications that run in both Node.js and browsers. Derby includes a powe

Dec 23, 2022

Node.js framework

Node.js framework Total.js framework is a framework for Node.js platfrom written in pure JavaScript similar to PHP's Laravel or Python's Django or ASP

Jan 2, 2023

🍔 A Node.js Serverless Framework for front-end/full-stack developers. Build the application for next decade. Works on AWS, Alibaba Cloud, Tencent Cloud and traditional VM/Container. Super easy integrate with React and Vue. 🌈

🍔 A Node.js Serverless Framework for front-end/full-stack developers. Build the application for next decade. Works on AWS, Alibaba Cloud, Tencent Cloud and traditional VM/Container. Super easy integrate with React and Vue. 🌈

Midway - 一个面向未来的云端一体 Node.js 框架 English | 简体中文 🥳 欢迎观看 Midway Serverless 2.0 发布会回放: https://www.bilibili.com/video/BV17A411T7Md 《Midway Serverless 发布

Jan 8, 2023

Marble.js - functional reactive Node.js framework for building server-side applications, based on TypeScript and RxJS.

Marble.js - functional reactive Node.js framework for building server-side applications, based on TypeScript and RxJS.

Functional reactive Node.js framework for building server-side applications, based on TypeScript and RxJS. Ecosystem Name Description @marblejs/core F

Dec 16, 2022

Catberry is an isomorphic framework for building universal front-end apps using components, Flux architecture and progressive rendering.

Catberry is an isomorphic framework for building universal front-end apps using components, Flux architecture and progressive rendering.

Catberry What the cat is that? Catberry was developed to help create "isomorphic/Universal" Web applications. Long story short, isomorphic/universal a

Dec 20, 2022
Owner
Quark.js
Quark.js is a lightning fast template rendering engine framework
Quark.js
Fast and low overhead web framework, for Node.js

An efficient server implies a lower cost of the infrastructure, a better responsiveness under load and happy users. How can you efficiently handle the

Fastify 26k Jan 2, 2023
:evergreen_tree: Modern Web Application Framework for Node.js.

Trails is a modern, community-driven web application framework for Node.js. It builds on the pedigree of Rails and Grails to accelerate development by

Trails 1.7k Dec 19, 2022
🦄 0-legacy, tiny & fast web framework as a replacement of Express

tinyhttp ⚡ Tiny web framework as a replacement of Express ?? tinyhttp now has a Deno port (work in progress) tinyhttp is a modern Express-like web fra

v 1 r t l 2.4k Jan 3, 2023
A serverless web framework for Node.js on AWS (CloudFormation, CloudFront, API Gateway, Lambda)

---- Sorry, this project is not maintained anymore. ---- dawson is a serverless web framework for Node.js on AWS (CloudFormation, CloudFront, API Gate

dawson 717 Dec 30, 2022
Component based MVC web framework for nodejs targeting good code structures & modularity.

Component based MVC web framework for nodejs targeting good code structures & modularity. Why fortjs Based on Fort architecture. MVC Framework and fol

Ujjwal Gupta 47 Sep 27, 2022
Realtime.js - a fast frontend framework based on Web-Components.

Realtime.js is a fast frontend framework based on Web-Components and Proxies. It has a lot of features to simplify your way of live as a vanillajs developer. The framework is programmed in such a way, that you can edit it yourself if you need additional features.

Kilian Hertel 7 Nov 1, 2022
The React Framework

Next.js Getting Started Visit https://nextjs.org/learn to get started with Next.js. Documentation Visit https://nextjs.org/docs to view the full docum

Vercel 98.6k Jan 5, 2023
The Intuitive Vue Framework

Build your next Vue.js application with confidence using Nuxt: a framework making web development simple and powerful. Links ?? Documentation: https:/

Nuxt 41.8k Jan 9, 2023
A progressive Node.js framework for building efficient, scalable, and enterprise-grade server-side applications on top of TypeScript & JavaScript (ES6, ES7, ES8) 🚀

A progressive Node.js framework for building efficient and scalable server-side applications. Description Nest is a framework for building efficient,

nestjs 53.2k Dec 31, 2022
Realtime MVC Framework for Node.js

Website Get Started Docs News Submit Issue Sails.js is a web framework that makes it easy to build custom, enterprise-grade Node.js apps. It is design

Balderdash 22.4k Dec 31, 2022