-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update the template with the new structure
- Loading branch information
Showing
10 changed files
with
98 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
.idea/ | ||
.vscode/ | ||
/vendor/ | ||
vendor/ | ||
composer.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Launch Built-in web server", | ||
"type": "php", | ||
"request": "launch", | ||
"cwd": "${workspaceRoot}/webroot", | ||
"runtimeArgs": [ | ||
"-dxdebug.mode=debug", | ||
"-dxdebug.start_with_request=yes", | ||
"-S", | ||
"localhost:8000" | ||
], | ||
"serverReadyAction": { | ||
"pattern": "Development Server \\(http://localhost:([0-9]+)\\) started", | ||
"uriFormat": "http://localhost:%s", | ||
"action": "openExternally" | ||
}, | ||
"env": { | ||
"DEVNET_ENVIRONMENT": "development" | ||
} | ||
} | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0"?> | ||
<Project> | ||
<Properties> | ||
<StartupObject>Application\Program</StartupObject> | ||
</Properties> | ||
<Items> | ||
<CodeFile include="vendor/autoload.php"/> | ||
</Items> | ||
</Project> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
{ | ||
"database": { | ||
"connection": "//username:[email protected]/database", | ||
"charset": "utf-8" | ||
"Logging": { | ||
"LogLevel": { | ||
"Default": "Information" | ||
} | ||
}, | ||
"environment" : "production" | ||
} | ||
"Database": { | ||
"ProviderType": "DevNet\\Entity\\PgSql\\PgSqlDataProvider", | ||
"ConnectionString": "host=localhost;database=dbname;user=username;password=password" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
namespace Application; | ||
|
||
use DevNet\Web\Extensions\ApplicationBuilderExtensions; | ||
use DevNet\Web\Extensions\ServiceCollectionExtensions; | ||
use DevNet\Web\Hosting\WebHost; | ||
|
||
class Program | ||
{ | ||
public static function main(array $args = []) | ||
{ | ||
$builder = WebHost::createDefaultBuilder($args); | ||
$builder->register(function ($services) { | ||
// Services | ||
}); | ||
|
||
$host = $builder->build(); | ||
$host->start(function ($app) { | ||
// Middlewares | ||
$app->useRouter(); | ||
$app->useEndpoint(function ($routes) { | ||
// Routes | ||
$routes->mapGet("/", fn () => "Hello World!"); | ||
}); | ||
}); | ||
} | ||
} |