user2171796
user2171796

Reputation: 431

Can I merge a node server with the polymer init starter-kit application?

I have my fledgling polymer application running. I would like to load and save a file. I would like to do that by using the ajax element. But what happens on the server side?

I have made nodejs express applications before. I could make a separate server for the client to talk to. But there are at least two other options:

  1. Take the front-end material supplied by the polymer start-kit and put it in the /public directory of an express application.

  2. Put express routes in my polymer starter-kit application.

I am inclined to bring Express into the existing start-kit application. But maybe someone else has already tried this, and can tell me what I will run into?

I looked at the starter-kit code a little bit. Apparently, it uses the spdy package and not the http package, but I can work with that. That's as far as I have gotten. Any advice?

Regards, Rick

Upvotes: 0

Views: 107

Answers (1)

user2171796
user2171796

Reputation: 431

I talked to the guys on the Polymer slack channel. Thanks, milesje. polymer serve is just supposed to be a light server to serve static files. If you want to do something more substantial, you should create your own server (nodejs or something else) and put your Polymer files in the public/ directory.

Hope this saves someone else some time.

Upvotes: 0

Related Questions