|
1 | 1 | # JavaScript.com
|
2 | 2 |
|
3 |
| -This is the repo for the JavaScript.com website. |
| 3 | +With the help of community members contributing content to the site, |
| 4 | +JavaScript.com aims to keep developers up to date on news, frameworks, and libraries. |
| 5 | +In addition, we aim to be a gateway for those wanting to learn JavaScript. |
4 | 6 |
|
5 |
| -## Installing NVM |
| 7 | +# Roadmap |
| 8 | +JavaScript.com was the product of a hack day and there's a lot of room for |
| 9 | +improvement. We have three main areas of focus for v2 of the app. |
6 | 10 |
|
| 11 | +##### Spec coverage |
| 12 | +If only the amount of console.logs counted as spec coverage, we'd be golden. |
| 13 | + |
| 14 | +##### User Voting |
| 15 | +Instead of approving new posts, we'll allow users to upvote and downvote stories |
| 16 | +as they see fit. |
| 17 | + |
| 18 | +##### Markdown Support |
| 19 | +Life just doesn't feel right without Markdown. |
| 20 | + |
| 21 | +### Contributions |
| 22 | +We'd love for you to contribute! For the time being, we will be placing a strong |
| 23 | +emphasis on getting the code base up to standards before adding new features. |
| 24 | + |
| 25 | +### Deployments |
| 26 | +We have two main branches, `master` and `production`. All PR's will be merged |
| 27 | +into `master` which is then merged into `production. The `production` branch is |
| 28 | +the code that is currenly deployed. |
| 29 | + |
| 30 | +At the moment, `master` is ahead of `production` while we streamline our deploy |
| 31 | +process. Please bear with us for the timing being! |
| 32 | + |
| 33 | + |
| 34 | +# Getting Started |
| 35 | +#### Installing NVM |
7 | 36 | Install NVM (`$ brew install nvm` and follow instructions)
|
8 | 37 |
|
9 | 38 | ```bash
|
10 |
| -nvm install iojs-v1.2.0 |
11 |
| -nvm use iojs-v1.2.0 |
| 39 | +nvm install 5.0.0 |
12 | 40 | npm install -g gulp
|
13 | 41 | npm install
|
14 | 42 | ```
|
15 | 43 |
|
16 |
| -This app authenticates with GitHub, so you'll need to create a GitHub Application and set ENVs for `GH_CLIENT_ID` and `GH_CLIENT_SECRET`. |
17 |
| - |
18 |
| -## Running |
| 44 | +#### Building Assets |
19 | 45 |
|
20 |
| -Run the application with `$ npm start`. You can also set the environment variables at start time. Here's an example: |
| 46 | +To build assets locally, you'll need to install Bower dependencies and run these Gulp tasks: |
21 | 47 |
|
22 | 48 | ```bash
|
23 |
| -$ GH_CLIENT_ID=myid GH_CLIENT_SECRET=mysecret npm start |
| 49 | +$ bower install |
| 50 | +$ gulp sass |
| 51 | +$ gulp javascript |
24 | 52 | ```
|
| 53 | +Remember to re-run these tasks after pulling or changing branches. |
| 54 | + |
| 55 | +#### Setup Github Application |
| 56 | +This app authenticates with GitHub, so you'll need to create a |
| 57 | +[GitHub Application](https://github.com/settings/applications/new). |
| 58 | + |
| 59 | +Set the **Homepage URL** to `http://localhost:3000` and |
25 | 60 |
|
26 |
| -For debugging all the things, run `DEBUG=* npm start`. |
| 61 | +the **Authorization callback URL** to `http://localhost:3000/sessions/auth/github/callback/` |
27 | 62 |
|
28 |
| -## Database |
| 63 | + |
| 64 | +#### Environment Variables |
| 65 | +We use [dotenv](https://github.com/motdotla/dotenv) to keep ourselves sane with |
| 66 | +the various environment variables. |
| 67 | + |
| 68 | +Copy `example.env` to `.env` and then fill in the variables. The only ones |
| 69 | +that are critical locally are Github variables for sign in. For everything else, |
| 70 | +you can setup test accounts if you'd like. |
| 71 | + |
| 72 | +#### Database Setup |
29 | 73 | Download and install [MongoDB](https://www.mongodb.org/downloads)
|
30 | 74 |
|
31 | 75 | When you run `npm start`, mongod will be forked as a background process. No need
|
32 | 76 | to create the database either. You're all set.
|
33 | 77 |
|
| 78 | +After you're done, make sure you run `npm stop` to shut down mongod. |
| 79 | + |
| 80 | +## Running the application |
| 81 | + |
| 82 | +Run the application with `$ npm start`. |
| 83 | + |
34 | 84 | ## Development
|
35 | 85 |
|
36 | 86 | If you add any runtime dependencies, you must run `npm shrinkwrap` and
|
37 | 87 | commit changes to `npm-shrinkwrap.json`.
|
38 | 88 |
|
39 |
| -### Building Assets |
40 |
| - |
41 |
| -To build assets locally, you'll need to install Bower dependencies and run these Gulp tasks: |
42 | 89 |
|
43 |
| -```bash |
44 |
| -$ bower install |
45 |
| -$ gulp sass |
46 |
| -$ gulp javascript |
47 |
| -``` |
48 |
| - |
49 |
| -Remember to re-run these tasks after pulling or changing branches. |
|
0 commit comments