Skip to content

lukvermeulen/feathers-monorepo-example

Repository files navigation

Feathers monorepo example

About

This is an example repository for a monorepo style full-stack application based on NextJS for the frontend and FeathersJS as the API. The monorepo is setup with

  • yarn2 workspaces
  • nx (as a command runner and for the generators, could perhaps be replaced)
  • typescript

By default the structure right now looks like the following:

/apps
----/api (featherjs)
----/web-client (nextjs)
/libs
----/components (react)

A shared component lib hosts created react components that can be used in other applications. The web-client imports a typed client from the api.

Setup

  1. run yarn install from the root
  2. verify the mongodb connection string in /apps/api/config/default.json

Commands

api

Start the API with nx start api or nx dev api

Generally any command specified in the scripts section of /apps/api/package.json can be run using nx <command> api

web-client

The api is generated by a nx generator, thus normal nx commands can be used e.g. nx serve web-client

NX

As nx is initialized, its generators can be used. By default @nrwl/next and @nrwl/react are installed as they have been used to create the nextjs app and the component library.

You could for example generate a new component in the library with nx g @nrwl/react:component <ComponentName> --project components (this assumes you have the nx cli installed globally).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published