Gaweph / p5-typescript-starter

Base starter project using p5js and typescript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to deploy it to a server?

wangzilinn opened this issue · comments

First of all, thank you for the template project, I have written a game based on this project, but how can I deploy this code to my Nginx? Or to github page like you did?

Short answer (if you still have the default packages.json file)

npm start this will generate a file at build/build.js

Add this to your index.html using <script src="build/build.js"></script>

Thsi is exactly what I have done here
https://github.com/Gaweph/p5-typescript-starter/blob/master/index.html

Don't forget - will also need a reference to https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.4.0/p5.min.js (or any version) in your html too

Thank you very much for your help, I have followed your tutorial and deployed it successfully!