polkovnikov.ph
polkovnikov.ph

Reputation: 6632

JS compiler to write frontend and backend code simultaneously

I would like to write projects with high level of interaction between frontend and backend. Currently I'm using Node.js for backend, Google Closure for frontend and own Swagger-like library to publish and use JSON services based on a schema. I don't like this approach, because changes to such projects are non-local, and need a lot of testing.

Is there a variant of JS (or, possibly, some language translating to JS) translating one source (possibly with some @server/@client annotations) both to frontend and backend code?

Upvotes: 2

Views: 402

Answers (1)

friedi
friedi

Reputation: 4360

There are two options which comes into my mind:

  • Have a look at the meteor-Framework. They have a way to publish functions to both the client and the server, so you can use one API everywhere.
  • If you want to write an application, you can use node-webkit. There you have got all functionality of an webkit browser plus node functinality all at the global namespace.

Upvotes: 2

Related Questions