Hey everyone! Another Wednesday, another update. It's the start of the fourth quarter and we have a busy few months lined up for you in regards to building APIs with Code.xyz. Two weeks ago we brought you Scheduled Tasks right from your browser, and our very own Steve Meyer published an article on how to Deliver New xkcd Comics to Your Phone Daily with Node.js, Standard Library Tasks, and Code.xyz.

That said, we've been receiving quite a bit of customer feedback that testing API endpoints from the browser can feel a little cumbersome: it's difficult to switch between files to have to go test an endpoint, especially when you're working with an endpoint that has multiple dependencies (relies on other files). We're listening, and we've had the same frustrations ourselves. This week we're excited to bring you a brand new, upgraded API running and debugging workflow right from your browser.

Running API

Before we get into the product updates, we'd like to give a brief shoutout to both Functions 18 Conference in Toronto where I had the opportunity to give the keynote presentation, and Confront in Malmo where we had an amazingly warm welcome to a Code.xyz workshop we ran.

Thanks again for everybody who attended!

Upgraded API Running and Debugging

With the newest iteration of Code.xyz we've turned debugging API endpoints from your functions/ folder into a truly first-class citizen of the in-browser development experience and we've moved some things around.

  • We've removed Parameter Editing from a right-handed sidebar to the new Debugger on the bottom of the screen
  • In addition, we've updated logging in the Debugger to be a better experience that keeps track of function execution history

Parameters and Logging

  • We've also changed how running API endpoints works
    • There's a new endpoint selector beside the Run button
    • By default, the status is linked (green link icon)
    • This means that as you change which API endpoint file you're in (in the functions/ folder), the Debugger will automatically switch to the correct endpoint
    • If you choose a file that is not in the functions/ folder, the endpoint selector will lock on the last modified endpoint
    • If you click the endpoint pin (green link icon) you can manually select which endpoint you'd like to run
    • to re-link the selector to your file selection, simply click the endpoint pin once again
  • Additionally, we now inline API endpoint call responses in your logs to maintain session records as you play with Code.xyz
  • Check the .gif below for examples of the above features in action!

Running API

  • Finally, we've changed how markdown previews work: any file that's identified as a markdown document will be given a preview in the bottom right of your editor, you can expand it by click the eyeball icon in the bottom right

Markdown Preview

That's it!

As per usual, if you'd like to play with the new features then head on over to code.xyz/?sample=t to load a sample project, or simply play with the editor inline as a part of this blog post below:

We hope you enjoy the new features, they should make API iteration and development a heck of a lot smoother. If you have any questions, please don't hesitate to come join our Slack workspace (click for invitation), follow us on Twitter, @StdLibHQ, or feel free to reach out directly to me on Twitter, @keithwhor. Always appreciate great feeback!

Happy building.

Keith Horwood
Founder and CEO, Standard Library