novus

command module
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 8, 2025 License: MIT Imports: 4 Imported by: 0

README

Overview

Novus streamlines managing of numerous localhost services by providing a simple way to define regular domain names instead. It comes with built-in HTTPS support so all domains are secure by default.

In the background it’s just good old Nginx acting as a proxy and DNSMasq for defining custom domain resolvers. No more /etc/hosts manipulation. SSL certificates are automatically managed and renewed for you by mkcert.

All you have to do is map your localhost URLs to the DNS domains. The rest is up to Novus and you can enjoy a seamless production-like experience on your machine 💯.

Installing

Installing Novus is very simple and can be done in two steps.

$ brew tap jozefcipa/novus
$ brew install novus

Verify that Novus has been installed.

$ novus -v

Updating

If you are already using Novus, you can update it by running

$ brew update novus

Usage

To start using Novus, run novus init.

It creates a novus.yml configuration file that you can open in your editor and define your domains mapping.

Example configuration:

appName: my-app
routes:
  - domain: my-frontend.test
    upstream: http://localhost:3000
  - domain: my-api.test
    upstream: http://localhost:4000

Once you’re done, just call novus serve and you can start using nice HTTPs domains locally.

Note: It will ask for your password as it performs some sudo calls (for managing DNS resolvers).

Commands

Here is the list of all available commands.
You can run them by calling novus [command]

Command Description
init Initializes the Novus proxy. Installs the necessary binaries and creates a configuration file (novus.yml)
serve [domain?] [upstream?] Reads the configuration file, updates DNS, creates SSL certificates and registers routes.

Note: You can also quickly define one route by providing the configuration directly in the CLI by calling e.g. novus serve my-api.test http://localhost:3000
status Shows Novus status and all registered apps.
stop Disables routing by stopping Nginx and DNSMasq
start Starts routing by starting Nginx and DNSMasq
pause [app] Pauses routing of a specific app.

Needed if there are multiple apps defined with conflicting domains
resume [app] Starts routing the paused app again.
remove [app|domain] Removes an app configuration from Novus and stops routing.
trust [--revoke?] Creates a sudoers record so Novus won't ask for sudo password.

Notes

💡 Prefer .test or another postfix that is not a valid TLD domain.

Do not use .local domain as it might be used by MacOS.

Do not use .dev domain either, this is now a valid TLD domain.

License

Novus is released under the MIT license.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL