postlight / lux

Build scalable, Node.js-powered REST JSON APIs with almost no code.
https://lux.postlight.com
MIT License
571 stars 60 forks source link

generate an intro GET / on lux new #331

Open kevboh opened 8 years ago

kevboh commented 8 years ago

Let me know if you think is a good idea and I'll open a PR. After lux new this is what localhost:4000 returns:

{"errors":[{"status":"404","title":"Not Found"}],"jsonapi":{"version":"1.0"}}

On Safari it just downloads a JSON blob 😢 . Maybe instead it could show a good next step, like a CLI command to generate a new controller?

javamonn commented 8 years ago

This sounds like a good idea to me, the old rails hello world page is good inspiration - maybe some links back to documentation guides as well?

zacharygolba commented 8 years ago

This is a great idea @kevboh!

kevboh commented 8 years ago

Okay, cool. I am Bad At HTML but can give it a simple shot and maybe ask a designer for help!

gentle-noah commented 8 years ago

I would love to pick this up if you can give me more info on Issue #51

zacharygolba commented 8 years ago

@gentle-noah I appreciate the enthusiasm!

Currently, we a working on a landing page/documentation website for Lux. I think we should hold off on this issue until we finish the landing page for the sake of normalizing the styles.

I'll keep you posted about this issue when more information is available. 😃

gentle-noah commented 8 years ago

@zacharygolba - right on. Let me know if you need a hand with any of that. Some recent things I have built that called for a lot of HTML and CSS would be Zooppa Marketing and Zooppa Community

nickschot commented 7 years ago

ember-welcome-page is another fine example of this. See: https://github.com/ember-cli/ember-welcome-page and more specifically: https://github.com/ember-cli/ember-welcome-page/blob/master/addon/templates/components/welcome-page.hbs

I think some similar pointers to docs/gitter etc. would be great. A simple way to disable/remove the whole thing would be great too. Maybe a middleware which inserts the HTML and modifies the response content type? That way it could be a separate package like the ember one and be disabled by removing the package + middleware call.

CzechsMix commented 7 years ago

Would that absolve the need to map an action to "GET /" ?

That's my current roadblock.

nickschot commented 7 years ago

No, that's still needed if we want it to be visible on '/' (which we want).