comet icon indicating copy to clipboard operation
comet copied to clipboard

Sample to for Real World App

Open rajnishmishra20 opened this issue 5 years ago • 3 comments
trafficstars

Would you please add any sample to show some real world REST sample like

SSL MySQL db access JWT Token auth Caching file uploads

Or we need to use barebone Workerman for this

rajnishmishra20 avatar Jul 09 '20 08:07 rajnishmishra20

There are no SSL support yet - I'll plan to enable it but for the moment use Comet behing Nginx for all production projects. I'll show how to use Eloquent ORM with Comet at documentation somewhat later this week. Undortunately, I have'nt use JWT, caching and file uploads yet, but try to document such things next week too.

gotzmann avatar Jul 13 '20 22:07 gotzmann

All this will make it one of most powerful REST frameworks. I hope eloquent will not be heavy as seen in Laravel.

rajnishmishra20 avatar Jul 14 '20 10:07 rajnishmishra20

I hope eloquent will not be heavy as seen in Laravel.

I don’t think it’s a good idea to add Eloquent to the project; it’s a very heavy ORM for such a fast framework. Personally, I use it in conjunction with Medoo. The code is incredibly simple and incredibly fast. The server in France responds to a request from Russia in just 60 ms. At the same time, Laravel takes 400-800 ms to do this. I'm still in shock! =)

For JWT you can use any library that follows PSR. For example, I use ReallySimpleJWT, it integrates very easily and even has its own middleware for token verification.

receiver1 avatar Sep 15 '23 19:09 receiver1