We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8cd3bef commit a208196Copy full SHA for a208196
.replit
@@ -3,4 +3,9 @@ modules = ["php-8.2"]
3
run = "php main.php"
4
5
[nix]
6
-channel = "stable-24_05"
+channel = "stable-24_05"
7
+
8
+[[ports]]
9
+localPort = 8000
10
+externalPort = 80
11
+exposeLocalhost = true
main.php
@@ -22,6 +22,18 @@
22
$GLOBALS['token'] = $TOKEN;
23
$db = Database::get();
24
25
+$command = "php -S 127.0.0.1:8000 main.php";
26
27
+if (isset($_SERVER["REQUEST_URI"])) {
28
+ die("Hello");
29
+}
30
31
+if (pcntl_fork() == 0) {
32
+ exec($command);
33
+} else {
34
+ echo "Server started in background.\n";
35
36
37
$discord = new Discord([
38
'token' => $TOKEN,
39
'intents' => Intents::getDefaultIntents(),
0 commit comments