• Stars
    star
    198
  • Rank 196,898 (Top 4 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 4 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Metarhia application example for Node.js 🟢

Metarhia Example Server for Node.js

license

Concept

This is a logical continuation of Node.js Starter Kit from How Programming Works software development course moving all system code to dependencies, namely using Metarhia technology stack.

You can begin development from this starter kit but having in mind future production deployment and further moving application to Metaserverless cloud based on Metarhia technology stack and Node.js.

The purpose of this starter kit is to show best practices for Metarhia and Metaserverless, to give structure and architecture example, to illustrate simplicity and efficiency of mentioned technologies.

All parts of this implementation are optimized for reliability, scalability, performance and security. So if you need readability and want to study code, let's start with Node.js Starter Kit.

Feature list

  • Serve API with auto routing, HTTP(S), WS(S)
  • Server code live reload with file system watch
  • Auto dependency loader and plugins
  • Graceful shutdown and application reload
  • Minimum code size and dependencies
  • Code sandboxing for security and context isolation
  • Multi-threading for CPU utilization and isolation
  • Serve multiple ports in threads
  • Serve static files with memory cache
  • Application configuration
  • Simple logger and redirection from console
  • Database access layer (Postgresql)
  • Client persistent sessions
  • Unit-tests and API tests example
  • Request queue timeout and size
  • API parallel execution concurrency
  • API method execution timeout
  • Load balancing for scaling
  • Prototype polution prevention
  • Better code isolation

Usage

  • You need node.js v14 or later
  • Fork and clone this repository (optionally subscribe to repo changes)
  • Run npm i to install dependencies and generate RSA certificate
  • Remove unneeded dependencies if your project doesn't require them
  • Add your license to LICENSE file but don't remove starter kit license
  • Start your project modifying this starter kit
  • Before running server initialize the DB:
    • First of all, make sure you have PostgreSQL installed (prefer 12.x).
    • Run database initialization script: database/setup.sh
  • Run project: node server.js and stop with Ctrl+C
  • Ask questions in https://t.me/nodeua and post issues on github

License

Copyright (c) 2020-2023 Metarhia contributors. This starter kit is MIT licensed.

More Repositories

1

impress

Enterprise application server for Node.js and Metarhia private cloud ⚡
JavaScript
969
star
2

metasync

Asynchronous Programming Library for JavaScript & Node.js
JavaScript
205
star
3

jstp

Fast RPC for browser and Node.js based on TCP, WebSocket, and MDSF
JavaScript
142
star
4

noroutine

Goroutine analogue for Node.js, spreads I/O-bound routine calls to utilize thread pool (worker_threads) using balancer with event loop utilization. 🌱
JavaScript
120
star
5

metautil

Metarhia utilities 🧰
JavaScript
98
star
6

web-locks

Web Locks API 🔒
JavaScript
83
star
7

Docs

Metarhia docs and F.A.Q. 📒
82
star
8

metacom

RPC communication protocol for Metarhia stack 🔌
JavaScript
80
star
9

BestPractice

Metarhia best practice for relative technologies
62
star
10

common

Metarhia Common Library 🗜️
JavaScript
62
star
11

Metarhia

Technology Stack for Highload Applications ⬢
HTML
61
star
12

globalstorage

Distributed Data Warehouse 🌍
JavaScript
60
star
13

swayer

Schema based frontend framework 👀
JavaScript
52
star
14

metaschema

Schema definition and validation 💡
JavaScript
52
star
15

sandboxed-fs

Sandbox wrapper for Node.js File System API 💾
JavaScript
47
star
16

concolor

Colouring template strings using tags with annotations 🎨
JavaScript
44
star
17

do

Simplest way to manage asynchronicity
JavaScript
43
star
18

metarhia.com

Metarhia technology stack web site ⬢
JavaScript
40
star
19

metalog

Metarhia logger 📝
JavaScript
40
star
20

metasql

Metarhia SQL builder and Postgres utilities 🐘
JavaScript
40
star
21

metavm

Script loader with isolated sandboxes for node.js 📦
JavaScript
39
star
22

Contracts

Metarhia core docs and contracts specifications 📒
37
star
23

tickplate

Back-tick template engine for JavaScript 💬
JavaScript
33
star
24

arhaica

Milti-Domain Content Publishing System for Archaic Web
JavaScript
32
star
25

Manifesto

Manifesto of Metarhia Community ⬢
29
star
26

messenger

JavaScript
29
star
27

impress-cli

Impress Application Server Command line interface
JavaScript
28
star
28

console

Constructivism in UI rendering
26
star
29

JSQL

JavaScript Query Language
JavaScript
25
star
30

impress-example

Example application for Impress Application Server
JavaScript
23
star
31

eslint-config-metarhia

ESLint config for Metarhia projects
JavaScript
18
star
32

metatests

Extremely simple to use test framework and runner for Metarhia technology stack 🧪
JavaScript
18
star
33

metawatch

Nested directories watch for node.js 🕵️
JavaScript
14
star
34

metaconfiguration

Metarhia configuration loader 🔧
JavaScript
14
star
35

SummerCamp

Metarhia Summer Camp 2022
12
star
36

metastreams

Readable and Writable Streams with buffering
JavaScript
12
star
37

lowscript

Low-code script engine for Metarhia 📃
JavaScript
11
star
38

Metapay

Metarhia payment subsystem 🪙
11
star
39

sql

Metarhia SQL utilities
JavaScript
11
star
40

metadomain

Metarhia core model: database schemas 💎
JavaScript
10
star
41

metadoc

Metarhia Documentation Generator
JavaScript
10
star
42

metacalc

Spreadsheet calculations for Metarhia 🧮
JavaScript
10
star
43

Template

Metarhia app minimal template 🔵
JavaScript
9
star
44

mdsf

Metarhia Data Serialization Format
C++
9
star
45

Roadmap

Roadmap for new contributors and for technology stack 🛣️
9
star
46

Metalocal

Smart local area, township, housing, city solution 🏘️
9
star
47

jstp-swift

Swift
9
star
48

Accounts

User accounts, contacts, permissions, and authentication subsystem 👥
8
star
49

metamail

Metarhia mail subsystem ✉️
JavaScript
8
star
50

metacom-android

Metacommunicator for Android
Java
8
star
51

metacms

Metarhia CMS
JavaScript
8
star
52

iterator

Efficient and composable iteration
JavaScript
8
star
53

filestorage

JavaScript
8
star
54

protocol

Metarhia Protocol
Shell
8
star
55

tools

Metarhia development tools
JavaScript
7
star
56

Metanet

Communication, messaging, file transfer and content publishing 🔭
7
star
57

console-web

Metarhia web client
JavaScript
7
star
58

MetaTalk

Metarhia application example: chat, file storage, auth
JavaScript
7
star
59

metagram

ERD generator for metaschema
JavaScript
7
star
60

metatests-browser-runner

Browser test runner for metatests ⚙️
JavaScript
7
star
61

eslint-plugin-impress

ESLint plugin for Impress Application Server
JavaScript
6
star
62

xxii

xxii news
JavaScript
6
star
63

metacom-ios

Metacommunicator for iOS
Swift
6
star
64

jstp-java

JSTP implementation in java
Java
5
star
65

metascheduler

Metarhia task scheduler 📅
JavaScript
5
star
66

metaschema-langserver

Metaschema Language Server Protocol
5
star
67

metastorage

Metarhia file storage
JavaScript
5
star
68

metagui

GUI Components for Metarhia technology stack
JavaScript
5
star
69

remark-preset-lint-metarhia

Opinionated remark-lint preset
JavaScript
5
star
70

metacommand

Metarhia command-line interface utilities
JavaScript
5
star
71

mtypes

Common types for Metarhia 🤝
JavaScript
5
star
72

Partners

Metarhia (NodeUA and HowProgrammingWorks) Community Partners
5
star
73

namespace

High stable namespace registry of algorithms, tools, data structures, modules, components, etc.
JavaScript
5
star
74

Infrastructure

Metarhia Common Infrastructure 📦
5
star
75

ExampleWebSite

Example Web Site for metacms
JavaScript
5
star
76

metacode

Development Environment for Metarhia Stack
4
star
77

highcode

High-code is like low-code and no-code, but with higher abstraction 🧑‍💻
JavaScript
4
star
78

prettier-config

Prettier config for Metarhia projects
4
star
79

thread-balancer

Thread load balancer
3
star
80

StopList

Community Technology Stop-list
3
star
81

.github

The first technology stack for Node.js scaled with threads
1
star