Every internet mystery is backed by some (bad) code, and this one here is no exception!
While nothing can ever recapture the experience, perhaps this can act as a keepsake or a jumping-off point for someone.
And don't worry, there's some more documentation coming!
You'll need to have the following things installed:
nvm
ornode
v18 or laterredis
yarn
If you already have node
v18 or later installed, feel free to skip this step, but nvm
(Node Version Manager) is handy because it allows you to easily switch between versions of node
.
To install (pick one or the other):
nvm
installation guides can be found here: https://github.com/nvm-sh/nvm?tab=readme-ov-file#installing-and-updatingnode
instructions here: https://nodejs.org/en/download
All communication between the cities happens through redis
, a very simple database.
Installation instructions can be found here: https://redis.io/docs/install/install-redis/
yarn
allows us to download all the other utilities used to create this project.
Once you have nvm
or node
installed, in the itegoarcanadei
root folder, run:
nvm i
(you can skip this if you're already on node 18 or later)npm install --global yarn
That's it.
To get things up and running, run the following commands in your Terminal:
git clone https://github.com/shahkashani/itegoarcanadei.git
cd itegoarcanadei
nvm i
(to switch to the correct version of node)yarn
(to download dependencies)
To run all the cities at once:
cd itegoarcanadei
yarn build-all
(this will take about a lifetime to complete)yarn start
(this will output the URL for each city)
If you want to run the cities individually:
cd cities/<cityname>
e.g.cd cities/adelma
yarn build
PORT=4000 yarn start
(or whatever port number you prefer)- Navigate to
http://localhost:4000
in your browser
In development mode, every time you change a line of code, the city will recompile and automatically update to show your changes.
cd cities/<cityname>
e.g.cd cities/adelma
yarn dev
- Navigate to
http://localhost:3000
in your browser
Some notes:
- By default each city runs on port
3000
, so if you leave this as-is, you'll need to CTRL+C out of the city before running another one - Some cities will have various things you can configure, like the passwords to enter them. These variables live in the
.env.local
files in the cities where this is relevant. You can override them by editing this file, or by creating a similar file called.env.production
with the same variables