Server: Serve
During development, you can run your code locally on your machine by using the "serve" command.
bm server serve
This will create a local server and so you'll be able to access your scripts as you would if they were on the server.
Any calls made to this local server will be listed in your command line window.
Â
Options:
--port
The port option will allow you to set a custom port. By default, port 3000 is used.
Â
Accessing Scripts Locally:
To access the scripts on your server, if you have CURL installed you will be able to call your scripts like this:
curl -v localhost:3000/helloworld
...or even via your web browser:
http://localhost:3000/helloworld
Essentially this is a web server, and you can access it using any of your favourite development tools, like you would any other web based API.
Tip: If your command line tool allows multiple tabs, run "serve" in one tab, and access it using a second tab.
Next:
Â
Â