Read and Write

What differentiates JS on the server from the client is its ability to do stuff out of the sandboxed environment of the browser, like reading and writing files on your hard drive. Spooky? Fear not.

Permalink Read more »

Cookies and Sessions

If you want to persist data among different pages you can use cookies or sessions. Cookies are persisted on the client, while sessions on the server, so it really depends on what you are doing.

Permalink Read more »

CURL and Twitter search

In this post we will be talking about getting data from other websites, something cURL has been doing for eons, but in server-side JS-speak it is called HTTP Client and here you will learn how to use it.

Permalink Read more »

Get and Post

We deal with forms a lot to capture data from the user and store it in our databases, sometimes we use GET, most of the time we use POST to pass that data to our server in order to handle it.

Permalink Read more »

FABE: The whole shebang

It's been an interesting experience building this blog engine using Javascript on the server with V8 and V8CGI. It showed us that everything we do today with python, ruby or php can easily be done with our beloved javascript, so why not give it a try?

Permalink Read more »

FABE: Admin console

Final phase, the admin console, where we can list, edit and delete entries at will. This post is going to be a little longer than previous ones so don't get bored, pay attention.

Permalink Read more »

FABE: Feeding the readers

This part is really easy, as we have done it before, all we have to do is get the last 10 entries and inject them in a template based on an atom feed.

Permalink Read more »

FABE: Adding new entries

For this step we are going to need an html editor so we can write articles prettily formatted. There are plenty of editors already in the wild, but some are such a pain to install and use that I decided to go with Yahoo Rich Text Editor, in the name of simplicity.

Permalink Read more »

FABE: Viewing blog entries

Now that we have our main window ready and our database tuned up, we need to show the articles when users click on their links. Here is how we are going to do that.

Permalink Read more »

FABE: Calling the data server

To get the real data from MySQL we will be using our good friend from a previous post, the dataserver.jss library which will handle all our data needs.

Permalink Read more »