Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[legacy-framework] Add Passenger recipe #2890

Merged
merged 6 commits into from
Nov 10, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions recipes/passenger/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## passenger

The Blitz Recipe for adding passenger.js
```
blitz install passenger
```

## More information

- [How to use receipes in Blitz](https://blitzjs.com/docs/using-recipes)
- [Deploying to Node.js app with Passenger](https://www.phusionpassenger.com/library/walkthroughs/deploy/nodejs/)
- [Passenger's Homepage](https://www.phusionpassenger.com/)

## Contributors

- Péter Nyári <[email protected]>

17 changes: 17 additions & 0 deletions recipes/passenger/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import {RecipeBuilder} from "@blitzjs/installer"
import {join} from "path"

export default RecipeBuilder()
.setName("Phusion Passenger")
.setDescription("")
.setOwner("[email protected]")
.setRepoLink("https://github.com/blitz-js/blitz")
.addNewFilesStep({
stepId: "addPassengerEntrypoint",
stepName: "Add passenger.js",
explanation: `NOTE: Passenger must be configured to use passenger.js as its startup file`,
targetDirectory: ".",
templatePath: join(__dirname, "templates"),
templateValues: {},
})
.build()
28 changes: 28 additions & 0 deletions recipes/passenger/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "@blitzjs/recipe-passenger",
"private": true,
"version": "0.34.0-canary.0",
"description": "The Blitz Recipe for adding passenger.js",
"main": "index.ts",
"scripts": {
"test": "echo \"No tests yet\""
},
"repository": {
"type": "git",
"url": "https://github.com/blitz-js/blitz.git"
},
"keywords": [
"blitz",
"blitzjs",
"passenger"
],
"author": "Péter Nyári <[email protected]>",
"license": "MIT",
"bugs": {
"url": "https://github.com/blitz-js/blitz/issues"
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"@blitzjs/installer": "0.41.2-canary.4"
netwarex marked this conversation as resolved.
Show resolved Hide resolved
}
}
10 changes: 10 additions & 0 deletions recipes/passenger/templates/passenger.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Startup script for Phusion Passenger that uses next.js cli
// Run `blitz build` before starting
const path = require('path')

const blitzPath = path.join(__dirname, 'node_modules', 'next', 'dist', 'bin', 'next');
netwarex marked this conversation as resolved.
Show resolved Hide resolved

process.argv.length = 1;
process.argv.push(blitzPath, 'start');

require(blitzPath);