change url to github, and prevent error from throwing when package version not found

This commit is contained in:
William Bell committed 2024-02-25 02:21:42 +00:00
1 parent b668737ba4
commit 00bcabb391
7 files changed
+45 -10

No files matched your search

+1 -2
View File
@@ -1,3 +1,2 @@
argon_modules
data
.env
data
+1 -1
View File
@@ -1 +1 @@
[{"Name":"bleach.ar","Version":"1.0.0","URL":"https://isotope.wbell.dev/isotope-download?name=bleach.ar\u0026version=1.0.0","Remote":"isotope.wbell.dev"},{"Name":"shlex.ar","Version":"1.0.1","URL":"https://isotope.wbell.dev/isotope-download?version=1.0.1\u0026name=shlex.ar","Remote":"isotope.wbell.dev"},{"Name":"neon.ar","Version":"beta1.0.2","URL":"https://isotope.wbell.dev/isotope-download?name=neon.ar\u0026version=beta1.0.2","Remote":"isotope.wbell.dev"},{"Name":"url.ar","Version":"1.0.1","URL":"https://isotope.wbell.dev/isotope-download?name=url.ar\u0026version=1.0.1","Remote":"isotope.wbell.dev"},{"Name":"http.ar","Version":"1.1.0","URL":"https://isotope.wbell.dev/isotope-download?version=1.1.0\u0026name=http.ar","Remote":"isotope.wbell.dev"}]
[{"Name":"bleach.ar","Version":"1.0.0","URL":"https://isotope.wbell.dev/isotope-download?name=bleach.ar\u0026version=1.0.0","Remote":"isotope.wbell.dev"},{"Name":"shlex.ar","Version":"1.0.1","URL":"https://isotope.wbell.dev/isotope-download?name=shlex.ar\u0026version=1.0.1","Remote":"isotope.wbell.dev"},{"Name":"neon.ar","Version":"beta1.0.2","URL":"https://isotope.wbell.dev/isotope-download?name=neon.ar\u0026version=beta1.0.2","Remote":"isotope.wbell.dev"},{"Name":"url.ar","Version":"1.0.1","URL":"https://isotope.wbell.dev/isotope-download?name=url.ar\u0026version=1.0.1","Remote":"isotope.wbell.dev"},{"Name":"http.ar","Version":"1.1.0","URL":"https://isotope.wbell.dev/isotope-download?name=http.ar\u0026version=1.1.0","Remote":"isotope.wbell.dev"}]
+36 -4
View File
@@ -6,13 +6,45 @@ Isotope is a package manager designed to simplify the process of managing and di
We've made it incredibly easy to set up your own Isotope Server using Docker. If you want to have your own private instance of Isotope, follow these simple steps:
1. Download the `docker-compose.yml` file from this repository.
1. Install Docker on your machine. You can find instructions for your operating system [here](https://docs.docker.com/get-docker/).
2. Open your terminal and navigate to the directory where you saved the `docker-compose.yml` file.
1. Install Docker Compose on your machine. You can find instructions for your operating system [here](https://docs.docker.com/compose/install/).
3. Run the following command to start your Isotope Server:
1. Install Git on your machine. You can find instructions for your operating system [here](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git).
1. Clone this repository:
```bash
git clone https://github.com/Open-Argon/isotope-server
cd isotope-server
```
1. edit the `.env` file to fit your needs.
1. build the Docker image:
```bash
./dockerBuild
```
1. Run the following command to start your Isotope Server:
```bash
docker compose up
```
That's it! Your Isotope Server will be up and running, ready to manage and distribute software packages. Please note that there is already a public server available at https://isotope.wbell.dev/, but deploying your own server allows you to have complete control and privacy for your package management needs.
to keep the server running in the background, you can use the following command:
```bash
docker compose up -d
```
That's it! Your Isotope Server will be up and running, ready to manage and distribute software packages. Please note that there is already a public server available at https://isotope.wbell.dev/, but deploying your own server allows you to have complete control and privacy for your package management needs.
feel free to edit any thing within the project to fit your needs.
## Contributing
We welcome contributions from the community. If you have any ideas, suggestions, or bug reports, please open an issue or a pull request. We are always looking for ways to improve Isotope and make it more useful for everyone.
feel free to fork the project and make any changes you see fit, and submit a pull request and we will review it as soon as possible.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
+1 -1
View File
@@ -9,7 +9,7 @@ let navbar(acc) = do
links.append('<a href="/login">Login</a>')
links.append('<a href="/register">Register</a>')
links.append('<a href="/package/create">Create</a>')
links.append('<a href="https://github.com/open-argon/Isotope">Github</a>')
links.append('<a href="https://github.com/Open-Argon/isotope-server">Github</a>')
return '<div class="navbar"><a href="/"><div class="logo"></div></a><div class="links">'+links.join("")+'</div></div>'
let middleware(req,res) = do
+4
View File
@@ -11,6 +11,10 @@ let download(req, res) = do
res.send("Package not found")
return
let currentVersion = package.versions.get_value(version)
if (currentVersion == null) do
res.code = 404
res.send("Version not found")
return
forever do
let redirect = currentVersion.get_value("redirect")
if (redirect) do
+1 -1
View File
@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Isotope</title>
<title>account - Isotope</title>
<link rel="stylesheet" type="text/css" href="/styles.css" />
<meta
name="viewport"
+1 -1
View File
@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Isotope</title>
<title>{{username}} - Isotope</title>
<link rel="stylesheet" type="text/css" href="/styles.css" />
<meta
name="viewport"