> Still, don't let express be the next rails.

it won't, in fact with mounted apps it goes right in to opposite direction, 
you can configure every piece of your app different and split them on 
different nodes w/o changing much. there are several frameworks built on 
top of express, that want to be the next rails, but i don't like them much. 
if i want rails, i'd rather use the original. express/connect are inspired 
by sinatara, but they do not hide nodes nature away so it's a good way for 
me.

> Truth be told, judging from the questions you ask and thus the views I 
expect you have, you might want to take a step backwards and try and grasp 
what node.js really is, what it can do and what it is good at. Almost 
anything is possible, but if you keep seeing node the same way as your wamp 
installation, this will stop you from understanding node. Sure, with a few 
lines of code node can act like a static file server, but thats really not 
all there is. 

+ gazilion to this.


Am Mittwoch, 20. Februar 2013 12:14:11 UTC+1 schrieb Geerten van Meel:
>
> Lets say this again: With the setup above, you have the skeletton of your 
> own webserver that behaves exactly like you want it to. With that setup, it 
> acts like a static file server and can serve anything that is in your 
> assets folder ("/static"). You start your node server instead of wamp. It 
> acts roughly the same, except that it really does serve all files in that 
> folder as-is, no php preprocessing or the like. 
>
> Also,* there is no Jade or Stylus involved*. At all.
>
> If you have a webpage that runs on wamp, and does not rely on backend 
> logic (no php files),* you can copy&paste it into your static file folder*and 
> it works right out of the box. Your webserver acts like a plain static 
> file server. The setup mentioned above is what you asked for in #6.
>
> Note that .htaccess shenanigans are not supported, but you can do this 
> more elegantly in node anyways. To expose your api as you did using php, 
> you will need to get your hands dirty with node in the form of your own 
> route logic. express does make custom routing a bit easier on you, maybe 
> thats a better fit after all when you're starting out. You can still use it 
> without much of the extra features.
>
> Truth be told, judging from the questions you ask and thus the views I 
> expect you have, you might want to take a step backwards and try and grasp 
> what node.js really is, what it can do and what it is good at. Almost 
> anything is possible, but if you keep seeing node the same way as your wamp 
> installation, this will stop you from understanding node. Sure, with a few 
> lines of code node can act like a static file server, but thats really not 
> all there is.
>
> @Gregor: express does indeed evolve in the right direction; My initial 
> distaste when I first used it was based on its api inconsistencies and 
> conventions at a point when documentation was scarce and configuration 
> possibilities were very limited. This probably has improved by now and my 
> views in this regard are outdated. Still, don't let express be the next 
> rails.
>
> All the best,
>
> Geerten
>
> On Tuesday, February 19, 2013 3:35:53 PM UTC+1, kanitkar...@gmail.comwrote:
>>
>> Hi,
>>
>> I would like to do the following,
>>
>> 1) Have regular .html .css & .js files just like a normal web app
>>
>> 2) Interact with Node Js only through Ajax calls
>>
>> 3) But All files mentioned in 1) are also hosted on the same Node Http 
>> server.
>>
>> So when I say http://localhost:3000/index.html, Node Js server should 
>> give me index.html along with all css & js files included in it.
>>
>> Then my Javascript & Ajax code should drive the functionality with Node 
>> program getting called by ajax request.
>>
>> Can anyone please please suggest me the best way to do this ?
>>
>> I don't want to use Jade or Stylus. I want to develop as if I am using 
>> tomcat or wamp server & use power of Node where ever needed only.
>>
>> I am aware of express js framework but don't know how it will be useful 
>> for above scenario.
>>
>

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to