Teamwork-based multiplayer game.
almostEvades
appwrite login
cd backend
appwrite deploy collection
appwrite deploy function
backend/functions
folder for each function. They all have README.md
describing what variables they needcd backend/colyseus-server
npm install
cp .env.example .env
nano .env
npm start
npm install
appwriteEndpoint
in src/lib/appwrite.ts
(Appwrite endpoint from server setup)npm run dev
myapp.com
and appwrite.myapp.com
Run following commands to setup an instance of Colyseus server:
# Machine setup
curl -fsSL https://deb.nodesource.com/setup_19.x | bash - && apt-get install -y nodejs
# SSL setup
sudo snap install core; sudo snap refresh core
sudo snap set certbot trust-plugin-with-root=ok
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
sudo apt install -y nginx
nano /etc/nginx/sites-available/eu1.evades.almostapps.eu
# Code to put into:
# server {
# listen 80;
# listen [::]:80;
# server_name eu1.evades.almostapps.eu;
# location / {
# proxy_pass http://127.0.0.1:3000;
# proxy_set_header Host $host;
# proxy_set_header X-Forwarded-Proto $scheme;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# }
# }
ln -s /etc/nginx/sites-available/eu1.evades.almostapps.eu /etc/nginx/sites-enabled/eu1.evades.almostapps.eu
sudo service nginx reload
sudo snap install certbot-dns-google
certbot
sudo service nginx reload
# Project setup
git clone https://github.com/Meldiron/almost-evades.git
cd almost-evades/backend/colyseus-server
npm install
# Production setup
cp .env.example .env
nano .env # (api_key)
npm run build
# Server start
screen -S colyseus
node lib/index.js
When contributing to backend-related logic, make sure to sync-up backend/appwrite.json
by running the appwrite init
commands in the backend
folder.
Everything you need to build a Svelte project, powered by create-svelte
.
If you're seeing this, you've probably already done this step. Congrats!
# create a new project in the current directory
npm create svelte@latest
# create a new project in my-app
npm create svelte@latest my-app
Once you've created a project and installed dependencies with npm install
(or pnpm install
or yarn
), start a development server:
npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --open
To create a production version of your app:
npm run build
You can preview the production build with npm run preview
.
To deploy your app, you may need to install an adapter for your target environment.