- Notifications
You must be signed in to change notification settings - Fork10
License
luan/slenderaac
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This project is a website for theCanary project. The main goal is to use modern technology to have something that is easy to maintain and extend. It is also meant to be efficient, secure and easy to deploy.
Clone this repository and install the dependencies:
git clone https://github.com/luan/slenderaac.gitcd slenderaacpnpm installcp .env.dist .env
Edit.env
with your server and desired settings. Then migrate the database using the command below. Note that this assumes your current database already has thecanary
schema imported.
pnpm migrate:resolvepnpm migratepnpm generate
At this point you should be ready to run the server:
pnpm dev
Deployment depends highly on your server setup. Assuming you are on a Linux dedicated server or VPS. You need the following:
As well as a database compatible withcanary
. You can use eitherMySQL orMariaDB.
sudo apt updatecurl -fsSL https://deb.nodesource.com/setup_20.x| sudo -E bash -&& sudo apt install -y nodejssudo npm install -g pnpmsudo apt install -y nginx
Clone this repository and install the dependencies:
git clone https://github.com/luan/slenderaac.gitcd slenderaacpnpm installcp .env.dist .env
We're just using Nginx as a reverse proxy. You can use any other web server that supports reverse proxying if you'd like. The Nginx configuration is as follows (adjust port and domain as needed if you're not using the defaults):
server {listen80 default_server;listen [::]:80 default_server;server_name _;location/{proxy_pass http://127.0.0.1:3000;proxy_http_version1.1;proxy_set_header Upgrade$http_upgrade;proxy_set_header Connection'upgrade';proxy_set_header Host$host;proxy_cache_bypass$http_upgrade; }}
Because we're now in a production environment, we need to build the project. This will generate the static files that will be served by the nodejs server. This is a one time step, you only need to do this again if you change /update the code.
pnpm generatepnpm build
At this point you should be ready to migrate the database. This will create the necessary tables and columns. Note that this assumes your current database already has thecanary
schema imported.
pnpm migrate:resolvepnpm migrate
Finally, we need to run the server, this will run on port 3000 by defaul, which is what we configured Nginx to proxy to.
NODE_ENV=production node -r dotenv/config build
Using your favorite method to edit the client (seethis tutorial for help). Set the login webservice url tohttp://localhost:5173/api/login (or your appropraite server URL). This will make the client use the AAC to login.
You'll need to download the spritesheet from here and place it inoutfits_anim
. These assets are not included in the repository because they can cause the repo to bloat, and are also not release under the same license as the code.
You'll need to download the spritesheet fromherethe items initems
. These assets are not included in the repositorybecause they can cause the repo to bloat, and are also not release under the same licenseas the code.
Anything you put into thestatic
folder in this repo will be served by the server. This is useful for storing assets for the game store. For example, you can put astatic/images/store
folder and then reference the images in the store using/images/store/my-image.png
. For instance, you can use the store assets made available in thecanary docs
Contributions are welcome! Please open an issue or pull request. Be sure to post screenshots and logs of any issues you're having.
MIT