30 lines
1.8 KiB
Markdown
30 lines
1.8 KiB
Markdown
# PC Rebels
|
|
To do (Add to this and use `~~content~~` to show its done)
|
|
---
|
|
- ~~Add Readme~~
|
|
- ~~Set Up init files~~
|
|
- ~~Make barebones index.html file~~
|
|
|
|
Set Up:
|
|
---
|
|
1. Download & install: [vscode](https://code.visualstudio.com/download) or any editor of your choice
|
|
2. Download & install: [nodejs](https://nodejs.org/en/download/) this is needed to host the website
|
|
3. Download & install: [git](https://git-scm.com/download/win) this is so we can use git from the commandline
|
|
4. Once this is done we have to init the local repo
|
|
5. In vscode use Ctrl+~ to open up a terminal and go to a directory where you want the repo to live: type in `git clone https://github.com/rayaman/pcrebels.git` **Note: This creates a folder named after the repo**
|
|
6. Next once that is done run `npm install` This will install all the node modules that we need to run the server
|
|
7. And with that everything should be stable and runnable
|
|
8. You will need to create a file called dev.env inside of the config folder. This is where we put private variables that we dont want being committed. The .gitignore file makes sure that we dont commit this file
|
|
9. Now let's test to see if things worked
|
|
- There are 2 ways to run the code
|
|
- `npm start` This is how the webhost will run our code
|
|
- `npm test ` This uses nodemon which reloads our code automatically when we make any changes and makes dev work eaiser. (Use `npm test` when you can)
|
|
10. Once you got the code running go to http://localhost:3000/ and see if something comes up.
|
|
|
|
|
|
Vscode Extensions to make working with nodejs a little eaiser
|
|
---
|
|
- https://marketplace.visualstudio.com/items?itemName=yzhang.markdown-all-in-one
|
|
- https://marketplace.visualstudio.com/items?itemName=chaliy.handlebars-preview
|
|
- https://marketplace.visualstudio.com/items?itemName=tht13.html-preview-vscode
|