express-phpify
Express, (literally) Redefined.
NOW WITH OPTIONS
Getting Started
Installing
Install this package to run following command.
npm install express-phpify // or else you can use `yarn add express-phpify`.
And just add below code to your app (if you don't need to configure something).
// `app` is your existing express application.;
OR use the options to match your needs! (v.1.1.0 or higher)
// `app` is your existing express application.
Phpifying existing application
Before you run actual application's codes, Please run phpify(app);
(Suppose app
as express application) beforehand.
phpifying can not procede, if you use phpify
after the application logic. (responses are already sent)
READ THIS!!
This library will only allow accessing to paths that end with / or with .php extension by default,
If you don't want it, Set the option redirection
to false
(default: true)
Built With
- Express - The web framework used
- TypeScript - The Best language on NodeJS
- PHP - The BADDEST language ever
Authors
See also the list of contributors who participated in this project.
License
This project is licensed under the MIT License - see the LICENSE.md file for details
Acknowledgments
- Why do you need this project?
- Inspired by this tweet(Korean), (Github profile)
- This library IS NOT guaranteed to be recognized as PHP.
- If this library does not correctly mock the express to PHP, and if you know how to fix it in the source code, Feel free to give us a PR. It always will be welcomed.
TODO
- Force .php extension to every routes. (DONE)
- stacktraces everywhere, just like PHP does.
- create user response to easteregg (DONE)