Defining an App Server

The heart of a Joystick app begins in the /index.server.js file at the root of your app. In development, when you run joystick start, Joystick will run this file via node, starting the Express HTTP server running under the hood and instrumenting all of Joystick's server-side features.

By making a call to the method on the default export from @joystick.js/node, we can define our app server and configure it's behavior.


import joystick from '@joystick.js/node';{
  routes: {
    '/': (req = {}, res = {}) => {

API Reference

Function API

Function API object) => Promise;


On This Page