Skip to content

Running the project

Diego Penha edited this page Jan 31, 2021 · 4 revisions

Prerequisites

required

You should have these installed before anything else

optional

You don't need it to run or to develop the project

  • Git (if you want to contribute to this repository)
  • MySQL (only used in the rank system)

Setup

  • Clone (or download) the project git clone https://github.com/tiny-devs/tiny-dungeon-online.git
  • On the terminal, go to the root folder, then go to "client"
    ("tiny-dungeon-online/client") and run yarn install

Running

If you're using VS Code, also install the Deno Extension
Since the server is Deno based (Typescript default) and client uses webpack bundling, you'll need two workspaces.
I personally open 2 VS Code windows, one of them I open the root folder (for server development), on the other I open the "client" folder (for client development), like so:

workspace image

On the client run
yarn start
this will update the file tiny-dungeon-online/client/public/bundle.js each time a file is edited and saved

On the server run
deno run --allow-net --allow-read --allow-env main.ts
then you should be able to access localhost:3000 on your browser!

Each new save on the client requires a reload on the page, in order for the Deno server to serve you the updated bundle.js file Each new save or modification on the server, requires a full stop and rerun the command "deno run ...".

That's it!

After these steps you should be ready to code for the project.
But if you wanna know more in depth details of how to contribute, keep reading this wiki!

Next steps

Now that you can run the project, how about an overview on how it all works?

Clone this wiki locally