You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Web/Sources/public/index.php

31 lines
1.0 KiB

<?php
require_once __DIR__ . '/../vendor/autoload.php';
require_once __DIR__ . '/../config/config.php';
// turn the if in obj mode
// if (APP_ENV === 'console') {
// require_once __DIR__ . '/../src/console/Console.php';
// }
// elseif (APP_ENV === 'development') {
// on pourait aussi gérer le port sois ici comme dans express sois comme dans un fichier de config json...
$appFactory = new AppCreator();
// builder.Services.AddScoped<AuthMiddlewareFliter>();
$app = $appFactory->registerService('','');
$appFactory.errorProvider(class:: or port)
// connexion string
// var connectionString = builder.Configuration.GetConnectionString("LolDatabase");
// builder.Services.AddDbContext<LolDbContext>(options =>
// options.UseSqlite(connectionString), ServiceLifetime.Singleton);
$app->use(new LoggingMiddleware());
$app = $appFactory->create();
$app.addHttpClient(HttpClient::class)
// je veux pas faire sa pour load les controller avec les anotation
$app->RegisterControllers();
$app->
$app->run();
}