Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

Pharo / Teapot REST Template

This is really just a personal itch I needed to scratch, but I am thinking it might be helpful to lots of other people interested in playing with the Pharo / Teapot packages. This package will set up a very basic, very complete REST server. All you will need to do is add some routes and act on those actions. I built this to allow me to quickly map out REST implementations without having worry about all the other things (persistence, etc) that can be worried about much later (if ever).

Dependencies

You will need to have Teapot installed or part of your project. This will also install Zinc and allow you to run tests and otherwise goof around with your server. If you are new to teapot, make sure to checkout the teapot entires that are added into your Tools Menu

pharo_image_and_bear

There are lots of added goodies that will be of help when testing your system.

Setting up your REST server

While this is a super simple REST server in that it only has one route and one error message, it’s amazingly complete. to fire up the server, and test its functionality (other than running the test), you can do:

|server| 
server := RestServer serveOn: 8800.
(ZnEasy get: 'http://localhost:8800/test_route') entity string. 

pharo_image

Now, All that remains is to fill in the routes and go nuts.

About

This is a template for a REST server written is Pharo Smalltalk

Resources

Releases

No releases published

Packages

No packages published