Skip to content

Kavita is a fast, feature rich, cross platform reading server. Built with the goal of being a full solution for all your reading needs. Setup your own server and share your reading collection with your friends and family.

Prepare for deployment of v0.1

Joseph Milazzo925a009f0004
diff --git a/.gitignore b/.gitignore
index ef856c786..e226d00c7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -448,4 +448,38 @@ appsettings.json
/API/kavita.db-wal
/API/Hangfire.db
/API/Hangfire-log.db
-cache/
\ No newline at end of file
+cache/
+/API/wwwroot/assets/images/image-placeholder.jpg
+/API/wwwroot/assets/images/mock-cover.jpg
+/API/wwwroot/assets/images/preset-light.png
+/API/wwwroot/assets/themes/plex/_bootswatch.scss
+/API/wwwroot/assets/themes/plex/_variables.scss
+/API/wwwroot/admin-admin-module.js
+/API/wwwroot/admin-admin-module.js.map
+/API/wwwroot/fa-brands-400.eot
+/API/wwwroot/fa-brands-400.svg
+/API/wwwroot/fa-brands-400.ttf
+/API/wwwroot/fa-brands-400.woff
+/API/wwwroot/fa-brands-400.woff2
+/API/wwwroot/fa-regular-400.eot
+/API/wwwroot/fa-regular-400.svg
+/API/wwwroot/fa-regular-400.ttf
+/API/wwwroot/fa-regular-400.woff
+/API/wwwroot/fa-regular-400.woff2
+/API/wwwroot/fa-solid-900.eot
+/API/wwwroot/fa-solid-900.svg
+/API/wwwroot/fa-solid-900.ttf
+/API/wwwroot/fa-solid-900.woff
+/API/wwwroot/fa-solid-900.woff2
+/API/wwwroot/favicon.ico
+/API/wwwroot/index.html
+/API/wwwroot/main.js
+/API/wwwroot/main.js.map
+/API/wwwroot/polyfills.js
+/API/wwwroot/polyfills.js.map
+/API/wwwroot/runtime.js
+/API/wwwroot/runtime.js.map
+/API/wwwroot/styles.css
+/API/wwwroot/styles.css.map
+/API/wwwroot/vendor.js
+/API/wwwroot/vendor.js.map
diff --git a/API/Controllers/FallbackController.cs b/API/Controllers/FallbackController.cs
new file mode 100644
index 000000000..74ff82999
--- /dev/null
+++ b/API/Controllers/FallbackController.cs
@@ -0,0 +1,14 @@
+using System.IO;
+using API.Services;
+using Microsoft.AspNetCore.Mvc;
+
+namespace API.Controllers
+{
+ public class FallbackController : Controller
+ {
+ public ActionResult Index()
+ {
+ return PhysicalFile(Path.Combine(Directory.GetCurrentDirectory(), "wwwroot", "index.html"), "text/HTML");
+ }
+ }
+}
\ No newline at end of file
diff --git a/API/Startup.cs b/API/Startup.cs
index 90a4aff92..aaa2dae49 100644
--- a/API/Startup.cs
+++ b/API/Startup.cs
@@ -58,10 +58,14 @@ namespace API
app.UseAuthorization();
+ app.UseDefaultFiles();
+ app.UseStaticFiles();
+
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
endpoints.MapHangfireDashboard();
+ endpoints.MapFallbackToController("Index", "Fallback");
});
}
}
diff --git a/README.md b/README.md
index 989e151d1..78693433b 100644
--- a/README.md
+++ b/README.md
@@ -10,4 +10,9 @@ open source variant that is flexible and packs more punch, without sacrificing e
* Metadata should allow for collections, want to read integration from 3rd party services, genres.
* Expose an OPDS API/Stream for external readers to use
* Allow downloading files directly from WebApp
-* WebApp/Server is Translated via Weblate (free for Open Source)
\ No newline at end of file
+* WebApp/Server is Translated via Weblate (free for Open Source)
+
+
+## How to Deploy
+* Build kavita-webui via ng build --prod. The dest should be placed in the API/wwwroot directory
+* Run publish command
\ No newline at end of file