Skip to content
This repository has been archived by the owner on Jan 15, 2022. It is now read-only.
/ gutenpress Public archive

A typed, functional, declarative way of creating nodeJS APIs

License

Notifications You must be signed in to change notification settings

Yurickh/gutenpress

Repository files navigation

Gutenpress

build status npm version MIT

@gutenpress/core

@gutenpress/helpers

@gutenpress/adapt-http

Disclaimer

As you can see from the version flagged as alpha, this project is a work in progress. It might not even be working if you download right now. Regardless, feel free to clone the repo and give it a spin; feedback is always very welcome!

Also, in retrospective, I think I overdid a bit on the types. :p~

Project structure

The gutenpress repo is a monorepo using lerna and yarn workspaces.

It's divided into two main sections:

This is where the packages that represent standalone examples live. We want to add as varied examples as we can think of, which different setups -- with express, without express, with TS, with no TS, as part of a bigger app, as a standalone thing, as a lambda, exporting mappersmith client typings -- the limit is your imagination. None of these packages will be published for obvious reasons. They also serve as playground.

Here is where our gutenpress packages live. Each folder here with a name X will be published as @gutenpress/X.

We want to have an adaptor structure. That is, we have a very lean core, and we build functionality on top of it to adapt it to different use cases. These adaptors serve a lot as opt-in features.

Set up

After cloning the PR, you should be able to install everything you need by running yarn at the top level.

Running linters

We use tsdx to eliminate most of the hassle of building and setting up our packages. To run the linter in all packages, run:

yarn lerna run lint --stream --parallel

Running type tests

We use tsd to verify our typings are sound. To run the type test in all packages, run:

yarn lerna run test:types --stream --parallel

Running unit tests

We currently have tests only for our helpers package, and we're aware this is not ideal. To run unit tests on this specific package, run:

yarn lerna run test --scope @gutenpress/helpers

Running example

To run the examples, you can cd into it and then start with yarn dev, for example:

cd packages/examples/express-ts
yarn dev
curl localhost:3000/express

API docs

TBD

For now, feel free to navigate around the example to get a grasp on how it works.

Contributing

TBD

About

A typed, functional, declarative way of creating nodeJS APIs

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published