You can use npm modules like Express in ActionScript. However, you need to create type definitions for them. Here's a tutorial:
https://apache.github.io/royale-docs/features/nodejs/external-modules -- Josh Tynjala Bowler Hat LLC <https://bowlerhat.dev> On Thu, May 14, 2020 at 12:30 PM Apache Royale <[email protected]> wrote: > That's really awesome if we can use Apache Royale on server side as well. > > Like we use mx s html jewel in namespaces and use them. Is it possible to > use node similarly? > What i wanted to know for both frontend and backend side. Like middleware > express etc are the core of nodejs. Can we use them directly in our > actionscript code to get the benefit of nodejs into Apache Royale. > > -Alina Kazi > > > > > > On Fri, 15 May 2020, 12:23 am Josh Tynjala, <[email protected]> > wrote: > > > Yes, it should be possible to write backend code with ActionScript and > > Apache Royale. It compiles to JavaScript, which must be run using > Node.js. > > > > I don't think a lot of people are using Apache Royale with Node.js yet, > so > > there won't be much documentation besides what you've already found, and > > there may be some bugs. > > > > -- > > Josh Tynjala > > Bowler Hat LLC <https://bowlerhat.dev> > > > > > > On Thu, May 14, 2020 at 12:11 PM Apache Royale <[email protected]> > > wrote: > > > >> Thank you Josh. > >> Can we use Apache Royale for both frontend and backend/serverside? As > now > >> people are using nodejs for backend as well. > >> > >> -Alina Kazi > >> > >> > >> On Thu, 14 May 2020, 8:59 pm Josh Tynjala, <[email protected]> > >> wrote: > >> > >> > There really isn't going to be a serious performance difference > between > >> > running Node.js with regular JavaScript versus running Node.js with > >> > ActionScript compiled to JavaScript. In the end, it all ends up being > >> > JavaScript. > >> > > >> > -- > >> > Josh Tynjala > >> > Bowler Hat LLC <https://bowlerhat.dev> > >> > > >> > > >> > On Thu, May 14, 2020 at 3:59 AM Alina Kazi <[email protected]> > >> > wrote: > >> > > >> >> Hi, > >> >> > >> >> I have a question regarding this > >> >> https://apache.github.io/royale-docs/features/nodejs > >> >> < > >> >> > >> > https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Ffeatures%2Fnodejs&data=02%7C01%7Caharui%40adobe.com%7Ced87dcecf3214f892db008d7f7d9a17f%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C1%7C637250386398099850&sdata=udLr7B5lmdJJDAQTGeAt1SQYSMQOGXaxwSXy1pTykPc%3D&reserved=0 > >> >> > > >> >> > >> >> > >> >> > >> >> What about the results of using node js with apache royale? > >> >> > >> >> Which executable will be faster apache royale with nodejs or only > >> nodejs > >> >> or > >> >> only apache royale? > >> >> > >> >> > >> >> - Alina Kazi > >> >> > >> > > >> > > >
