- Go to
https://github.com/oacodeclub/oacodeclub.github.io
, or alternatively,https://github.com/LilGamerPlayz/oacodeclub.github.io
for the forked version.- Code > Codespaces > Create codespace or dev
- Run in local environment:
- Run
npm start
ornode src
in the terminal - This will start a server, and give up a notification to open it. If you don't get a notification, go to Ports > Local Address and click on the link. Alternatively, turn it off with CTRL + C and rerun the command.
- Run
- Push a production build to Github:
- Run
npm run deploy
in the terminal - This will push an optimized build to the main branch. If you want to share your code, do a regular commit/push to the dev branch (see Git).
- Run
- Production build at
https://oacodeclub.github.io
, forked version available at:https://oacodeclubgithubio-production.up.railway.app/
-
Everything you do to be shown to the user should be in public
/public/index.html
is the main page, you can access it by going tolocalhost:3000
ORlocalhost:3000/index.html
./public/Assets
is where you put css, js, images and assets, etc./public/index.html
is the homepage that is shown to the user- How to do a basic website: Files available in
/public/Assets/example
as an example for how to do a basic website, if running in local environment, go tolocalhost:3000/Assets/example/eXample.html
to see the example.
-
Everything you do do that should be hidden from the user should be in
/src/index.js
/src/index.js
is the main file that is run, it is also where you start the server by doing nodesrc/index.js
ornode src
- HTML and CSS files should NOT be in
/src
, as it is not shown to the user. src/index.js
is only for server-side code written in NodeJS. Regular JavaScript functions should be done in/public/Assets/js/yourfile.js
- Open the Source Control tab (Ctrl + Shift + G)
- Stage the changes you want to include in this commit (press the + button)
- Write a commit message describing what you’ve changed
- Do a commit and pull request to the dev branch