Skip to content

Commit 26bfaf3

Browse files
committed
Readme: improvements
1 parent f8a5a29 commit 26bfaf3

File tree

1 file changed

+23
-11
lines changed

1 file changed

+23
-11
lines changed

README.md

+23-11
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@ Enjoyable & powerful 🐘 PHP builder for ZEIT Now.
99
</p>
1010

1111
<p align=center>
12-
<a href="https://www.npmjs.com/package/now-php"><img alt="npm" src="https://img.shields.io/npm/dt/now-php?style=flat-square"></a>
13-
<a href="https://www.npmjs.com/package/now-php"><img alt="npm (latest)" src="https://img.shields.io/npm/v/now-php/latest?style=flat-square"></a>
12+
<a href="https://www.npmjs.com/package/now-php"><img alt="npm" src="https://img.shields.io/npm/dt/now-php?style=flat-square"></a>
13+
<a href="https://www.npmjs.com/package/now-php"><img alt="npm (latest)" src="https://img.shields.io/npm/v/now-php/latest?style=flat-square"></a>
1414
</p>
1515

1616
<p align=center><strong>🏋️‍♀️ It works with these frameworks and tools.</strong></p>
1717

1818
<p align=center>
19-
<a href="https://github.com/nette"><img src="https://github.com/nette.png" width="128"></a>
20-
<a href="https://github.com/symfony"><img src="https://github.com/symfony.png" width="128"></a>
21-
<a href="https://github.com/illuminate"><img src="https://github.com/illuminate.png" width="128"></a>
22-
<a href="https://github.com/slimphp"><img src="https://github.com/slimphp.png" width="128"></a>
23-
<a href="https://github.com/phalcon"><img src="https://github.com/phalcon.png" width="128"></a>
19+
<a href="https://github.com/nette"><img src="https://github.com/nette.png" width="128"></a>
20+
<a href="https://github.com/symfony"><img src="https://github.com/symfony.png" width="128"></a>
21+
<a href="https://github.com/illuminate"><img src="https://github.com/illuminate.png" width="128"></a>
22+
<a href="https://github.com/slimphp"><img src="https://github.com/slimphp.png" width="128"></a>
23+
<a href="https://github.com/phalcon"><img src="https://github.com/phalcon.png" width="128"></a>
2424
</p>
2525

2626
-----
@@ -55,16 +55,28 @@ You should define `functions` property in `now.json` and list PHP files directly
5555
```json
5656
{
5757
"functions": {
58-
"index.php": {
59-
"runtime": "[email protected]"
60-
},
6158
"api/*.php": {
62-
"runtime": "[email protected].5"
59+
"runtime": "[email protected].6"
6360
}
6461
}
6562
}
6663
```
6764

65+
If you need to show index page define `routes` properly.
66+
67+
```json
68+
{
69+
"functions": {
70+
"api/index.php": {
71+
"runtime": "[email protected]"
72+
}
73+
},
74+
"routes": [
75+
{ "src": "/(.*)", "dest": "/api/index.php" }
76+
]
77+
}
78+
```
79+
6880
## 👨‍💻`now dev`
6981

7082
For running `now dev` properly, you need to have PHP installed on your computer, [learn more](errors/now-dev-no-local-php.md).

0 commit comments

Comments
 (0)