0

What is '/zappa/full.js'

I have some code with a /zappa/zappa.js file (ethercalc) and the tutorial has /zappa/full.js and there is even a /zappa/simple.js in the examples.

What are these files, what is the difference, any docs?

e.g. /zappa/full.js from https://zappajs.github.io/zappajs/docs/crashcourse

@get '/': ->
  @render 'index'

{doctype,html,head,title,script,body} = @teacup
@view index: ->
  doctype 5
  html ->
    head ->
      title 'Client-side zappa'
      script src: '/zappa/full.js'
      script src: '/index.js'
    body ''

Also I get a not found error with /zappa/full.js and have no idea if I can use /zappa/zappa.js instead.

eddyparkinson
  • 3,680
  • 4
  • 26
  • 52
  • It looks like just another javascript file the author has included in their project. There doesn't seem to be any relationship between these files and what the author is trying to express. I would try not including them and see if your application works as expected without these JS files. –  Mar 05 '15 at 19:16
  • It looks like the files are the client libraries for zappa. But not sure what the difference is. With the code I have, it uses "zappa.js maybe because the code uses livescript. (Note Livescript is like coffeescript but with some scope improvements.) – eddyparkinson Mar 05 '15 at 22:44

1 Answers1

0

zappa middleware serves

From https://zappajs.github.io/zappajs/docs/reference#root-scope

zappa

This zappa middleware serves /zappa/simple.js, /zappa/full.js, /zappa/zappa.js, /zappa/jquery.js and /zappa/sammy.js. It is automatically added by @client and @shared if not added before, which means that in most cases you don’t need to @use 'zappa'. To minimize page download delay on the client, prefer /zappa/full.js, which combines Zappa, jQuery, Sammy.js, and Socket.IO client-side scripts into a single download. If your client-side code doesn’t require Sammy, use /zappa/simple.js which combines Zappa, jQuery, and Socket.IO.

eddyparkinson
  • 3,680
  • 4
  • 26
  • 52