• Home
  • Why Erstwhile?
  • Getting Started
  • Learn Erstwhile
  • API Docs
  • Home
  • Why Erstwhile?
  • Getting Started
  • Learn Erstwhile
  • API Docs
  • Learning Erstwhile
  • File Structure
  • Compilation Process
  • Routing
  • Request Flow
  • Components and ErML
    • How Components are Compiled
    • Themes
    • Layouts
  • Scoped Variables
  • Modals
  • Models
    • Using an Erstwhile-aware Backend
    • Creating Your Own Description.json
    • Using Models from the Controller

Using an Erstwhile-aware Backend

10 views 0

Written by mike
August 8, 2023

If you’re using an Erstwhile-aware backend things are really easy. Ask the backend developer for the URL of the backend server and where they host the API description.

Then set up some environment variables in your .env:

# Erstwhile
ERSTWHILE_API_URL=http://localhost:8022
ERSTWHILE_API_DESCRIPTION_PATH=/describe

After that, run npm run models. Done.

Servers using our module to publish their desciption.json file will also be self-documenting; you can go to the URL of the description file with an extra parameter to see a nice HTML readout of the file:

http://localhost:8022/describe?format=html

If everything goes well, you should see something like this:

Was this helpful?

Yes  No
Related Articles
  • Using Models from the Controller
  • Creating Your Own Description.json
  • Models
  • Modals
  • Scoped Variables
  • Layouts

Didn't find your answer? Contact Us

Previously
Models
Up Next
Creating Your Own Description.json

loader

Join our Mailing List     

  • Privacy Policy
  • Terms of Use
  • © 2025 RestlessDev. Made in New Orleans.

Welcome to Erstwhile

Thank you for checking out Erstwhile. We’re just getting started, so if you’d like to keep up with our progress please register now and we’ll let you know when new releases come out.

loader

Email Address*

Name