• Stars
    star
    436
  • Rank 99,461 (Top 2 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 4 years ago
  • Updated over 1 year ago

Reviews

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

Repository Details

Starter Kit for Node.js 16 or later, minimum dependencies πŸš€

Node.js Starter Kit

Concept

You can begin development from this Starter Kit, but it is not for production usage. The purpose of this Starter Kit is to show simplicity, basic concepts, give structure and architecture examples. All parts of this implementation are optimized for readability and understanding, but not for performance and scalability.

So it is good for development and education. However, for production deployment, you may need the Metarhia Example App an open-source application server on the top of Node.js.

Feature list

  • Pure node.js and framework-agnostic approach
  • Minimum code size and dependencies
  • Layered architecture: core, domain, API, client
  • Protocol-agnostic API with auto-routing, HTTP(S), WS(S)
  • Graceful shutdown
  • Code sandboxing for security, dependency injection and context isolation
  • Serve multiple ports
  • Serve static files with memory cache
  • Application configuration
  • Simple logger
  • Database access layer (Postgresql)
  • Persistent sessions
  • Unit-tests and API tests example
  • Request queue with timeout and size
  • Execution timeout and error handling

Requirements

  • Node.js v16 or later
  • Linux (tested on Fedora, Ubuntu, and CentOS)
  • Postgresql 9.5 or later (v12 preferred)
  • OpenSSL v1.1.1 or later
  • certbot (recommended but optional)

Usage

  1. Fork and clone this repository (optionally subscribe to repo changes)
  2. Remove unneeded dependencies if your project doesn't require them
  3. Run npm ci --production to install dependencies and generate certificate
  4. Add your license to LICENSE file but don't remove starter kit license
  5. Start your project by modifying this starter kit
  6. Run project with node server.js and stop with Ctrl+C

Help

Ask questions at https://t.me/nodeua and post issues on github.

License

Copyright (c) 2020-2023 How.Programming.Works contributors. This starter kit is MIT licensed.

More Repositories

1

Index

Metarhia educational program index πŸ“–
JavaScript
3,216
star
2

Dictionary

Programming Dictionary
626
star
3

Book

Metaprogramming. Multi-paradigm approach in the Software Engineering.
JavaScript
461
star
4

Letters

Письма ΠΊ студСнтам курса
JavaScript
105
star
5

DDD

Domain-driven design
JavaScript
100
star
6

NodeServer

Compare node.js servers
JavaScript
74
star
7

Exams

Exams readiness test
JavaScript
62
star
8

Profile

Personal profile of software engineering skills
59
star
9

Certification

Certificates of Qualification in Software Engineering
39
star
10

Function

Functions as a method to raise level of code abstraction
JavaScript
37
star
11

DataTypes

Built-in data types
JavaScript
36
star
12

Reusable

Reusable abstractions
JavaScript
31
star
13

Metaprogramming

Metaprogramming examples
JavaScript
29
star
14

Tools

Development tools and environment configuration
JavaScript
28
star
15

InversionOfControl

IoC: dependency injection, module sandboxing, framework wrappers, etc.
JavaScript
23
star
16

Closure

Function closures and storing data in function scope
JavaScript
23
star
17

AbstractionLayers

Abstraction Layers
JavaScript
23
star
18

AsynchronousProgramming

Asynchronous Programming
JavaScript
22
star
19

HigherOrderFunction

Higher-order functions having functions as arguments or result
JavaScript
20
star
20

Promise

Asynchronous Programming with Promises
JavaScript
20
star
21

EventEmitter

Simple EventEmitter with multiple listeners
JavaScript
19
star
22

ChatGPT

How to work together with ChatGPT
JavaScript
19
star
23

API

Application Interface with HTTP Transport and JSON serialization
JavaScript
19
star
24

Generator

Generators, coroutines and some monads examples
JavaScript
19
star
25

Functor

Mappable objects
JavaScript
19
star
26

Composition

Function composition
JavaScript
18
star
27

Memoization

Memoization of synchronous and asynchronous functions
JavaScript
18
star
28

WebsocketChat

Simple browser chat with websocket and node.js
HTML
18
star
29

Benchmark

Performance testing for different techniques
JavaScript
17
star
30

PartialApplication

Partial function application and Currying
JavaScript
17
star
31

ServiceWorker

Service Workers for PWA caching, proxy and offline
JavaScript
16
star
32

InterProcessCommunication

Inter-process Communication
JavaScript
16
star
33

Mutex

Preventing race conditions with Mutual Exclusion
JavaScript
16
star
34

go-meetups

Lectures of Go meetups at HowProgrammingWorks
Go
14
star
35

Antipatterns

Antipatterns as a Worst Practices
JavaScript
14
star
36

Sandboxes

VM Sandboxes
JavaScript
14
star
37

Projection

Data structures projection
JavaScript
14
star
38

EventDrivenProgramming

Event-driven programming
HTML
14
star
39

Controller

GRASP: Controller principle
JavaScript
13
star
40

Databases

Work with Database Management Systems
JavaScript
13
star
41

ActorModel

Actor model (concurrent computation model)
JavaScript
13
star
42

Session

HTTP server with sessions, tokens, cookies
JavaScript
13
star
43

Graph

Directed graph implementations
JavaScript
12
star
44

Lowcode

Low-code simplified JavaScript
JavaScript
12
star
45

Wrapper

Wrapper functions, Interface wrappers, etc.
JavaScript
12
star
46

Observer

Pattern Observer
JavaScript
12
star
47

ProxyHTTP

Node.js HTTP Proxy
JavaScript
12
star
48

FunctionalProgramming

Functional Programming
JavaScript
11
star
49

LinkedList

Linked list data structure
Haskell
11
star
50

School

Modern school program
11
star
51

Threads

Multithreading: WorkerThreads, Workers, SheredWorkers
JavaScript
11
star
52

Abstractions

Programming is abstract thinking
JavaScript
11
star
53

Iteration

Different implementation of iterations as a code abstraction
JavaScript
10
star
54

Callbacks

Callbacks, Listeners and Events
JavaScript
10
star
55

Packages

Node.js Packages
JavaScript
10
star
56

RaceCondition

Race Condition
JavaScript
10
star
57

Semaphore

Binary Semaphore, Counting Semaphore
JavaScript
10
star
58

Environment

Environment Setup
9
star
59

Proxy

Proxy
JavaScript
9
star
60

Files

Files and file system
JavaScript
9
star
61

Cheatsheet

Language Cheatsheet
JavaScript
9
star
62

PrototypeChain

Chain of Prototype Inheritance
JavaScript
9
star
63

DependencyInjection

Resolving dependencies with dependency injection
JavaScript
9
star
64

Introduction

Introduction to programming
9
star
65

Modularity

Modularity and Dependency
JavaScript
9
star
66

Prototype

Prototype-oriented programming
JavaScript
8
star
67

Project

Example project
JavaScript
8
star
68

CommandLine

CLI, Command Line Interface and Console
JavaScript
8
star
69

LiveQA

Programming, JavaScript, Node.js, Architecture Seminars
8
star
70

VersionControl

Git Version Control System and GitHub Usage Recommendations
8
star
71

NonBlocking

Non blocking loops
JavaScript
8
star
72

ServeStatic

Serve static content with HTTP
JavaScript
8
star
73

Socket

Network Socket Endpoint Interface
JavaScript
8
star
74

AsyncAwait

Async/Await
JavaScript
8
star
75

LiveTable

Multiuser spreadsheet example
HTML
7
star
76

GracefulShutdown

Graceful shutdown for network servers
JavaScript
7
star
77

Chaining

Chaining with classes, ptototypes and functors
JavaScript
7
star
78

CodeReview

Code Review Examples
JavaScript
7
star
79

Future

Future as Asynchronous Abstraction
JavaScript
7
star
80

Thenable

Thenable contract
JavaScript
7
star
81

AsyncAdapter

Asynchronous Adapters
JavaScript
7
star
82

ConcurrentQueue

Asynchronous Concurrent Queue with Priority and Factor
JavaScript
7
star
83

Mixin

Mixin behavior, structure and relations
JavaScript
7
star
84

RegExp

Regular Expression is a Syntax to Define String Pattern
Java
7
star
85

Automata

Automata-based programming
JavaScript
6
star
86

DataStructures

Data structures basics
JavaScript
6
star
87

SQL

Structured Query Language
JavaScript
6
star
88

Transaction

Atomic transaction container for struct or object
JavaScript
6
star
89

Map

Map as Associative Array
JavaScript
6
star
90

Pool

Object Pool
JavaScript
6
star
91

Arrays

Arrays
JavaScript
6
star
92

PromiseError

Catch, unhandledRejection, rejectionHandled and multipleResolves
JavaScript
6
star
93

Application

Browser application loader example
JavaScript
6
star
94

hpw

Laboratory work auto checker
JavaScript
6
star
95

Node-API

Node-API (N-API)
C
5
star
96

MemoryLeaks

Memory Leaks
JavaScript
5
star
97

Lenses

Lenses, fp getter & setter
Haskell
5
star
98

Cancelable

Cancelable Asynchronous Abstractions
JavaScript
5
star
99

HttpRequest

HTTP, XMLHttpRequest, fetch
JavaScript
5
star
100

Decomposition

Decomposition and refactoring
JavaScript
5
star