Re: [Express-js] Publish extjs UI to client

56 views
Skip to first unread message

Oleg Verych

unread,
Sep 10, 2012, 5:41:39 AM9/10/12
to expre...@googlegroups.com
2012/9/10, oohogwash <gavan...@gmail.com>:
> Hi,
> I have been attempting to run a Sencha ExtJs client from express.
[...]
> If someone has a code snippet with express, connect or node that
> demonstrates this I would really appreciate it.

This works with ext-4.1.0-gpl.zip unzipped /../../extjs-4.1 two level
above app project files.

app.configure(function(){
var ma = 77777777
app.use(express.bodyParser()) //parse JSON into objects
app.use(express.methodOverride())
app.use(app.router)
app.use('/extjs/resources' ,express.static(__dirname +
'/../../extjs-4.1/resources' ,{ maxAge: ma }))
app.use('/extjs/docs' ,express.static(__dirname +
'/../../extjs-4.1/docs' ,{ maxAge: ma }))
app.use('/extjs/ux' ,express.static(__dirname +
'/../../extjs-4.1/examples/ux'))
app.use('/extjs/examples/ux' ,express.static(__dirname +
'/../../extjs-4.1/ux'))
app.use('/extjs' ,express.static(__dirname + '/../../extjs-4.1'))
....

html examples:
<script src="extjs/ext-all-debug.js"></script>
<a id="id_extjslog_head" href="extjs/docs/index.html"
target="_blank"><b>_ExtJS_</b></a>

etc.

--
sed 'sed && sh + olecom = love' << ''
-o--=O`C
#oo'L O
<___=E M
Reply all
Reply to author
Forward
0 new messages