|
1 |
| - |
2 |
| -# Vulcan Starter |
3 |
| - |
4 |
| -This kit gives you all you need to quickly learn Vulcan and launch your own projects. |
5 |
| - |
6 |
| -Other resources: |
7 |
| - |
8 |
| -- [Vulcan Docs](http://docs.vulcanjs.org) |
9 |
| -- [Vulcan Slack](http://slack.vulcanjs.org) |
10 |
| - |
11 |
| -<!-- START doctoc generated TOC please keep comment here to allow auto update --> |
12 |
| -<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> |
13 |
| -**Table of Contents** |
14 |
| - |
15 |
| -- [Quick Install](#quick-install) |
16 |
| - - [Step 1 - Clone](#step-1---clone) |
17 |
| - - [Step 2 – Run](#step-2--run) |
18 |
| -- [Getting Started Tutorial](#getting-started-tutorial) |
19 |
| -- [Other Examples](#other-examples) |
20 |
| -- [Complete Install](#complete-install) |
21 |
| - - [Critical prerequisite](#critical-prerequisite) |
22 |
| - - [Step 1 - Preparation](#step-1---preparation) |
23 |
| - - [Step 2 - Test Vulcan installation](#step-2---test-vulcan-installation) |
24 |
| - - [Step 3 - Prepare your project](#step-3---prepare-your-project) |
25 |
| - - [Step 4 - Test your project installation](#step-4---test-your-project-installation) |
26 |
| - |
27 |
| -<!-- END doctoc generated TOC please keep comment here to allow auto update --> |
28 |
| - |
29 |
| -## Quick Install |
30 |
| - |
31 |
| -If you already have Meteor up and running, read this section. Otherwise, read the [Complete Install](#complete-install) section. |
32 |
| - |
33 |
| -#### Step 1 - Clone |
34 |
| - |
35 |
| -``` |
36 |
| -git clone [email protected]:VulcanJS/Vulcan-Starter.git |
37 |
| -cd Vulcan-Starter |
38 |
| -``` |
39 |
| - |
40 |
| -(or, using `https`: `git clone https://github.com/VulcanJS/Vulcan-Starter.git`) |
41 |
| - |
42 |
| -#### Step 2 – Run |
| 1 | +[Vulcan docs](http://docs.vulcanjs.org) |
43 | 2 |
|
44 | 3 | ```
|
| 4 | +git clone [email protected]:GraphQLGuide/news.git |
| 5 | +cd news |
45 | 6 | npm install
|
46 | 7 | npm start
|
47 | 8 | ```
|
48 | 9 |
|
49 |
| -## Getting Started Tutorial |
50 |
| - |
51 |
| -When you first run this repo, you'll see the first step of Vulcan's interactive Getting Started tutorial. |
52 |
| - |
53 |
| - |
54 |
| - |
55 |
| -This interactive tutorial will guide you through Vulcan basics, such as: |
56 |
| - |
57 |
| -- Creating routes. |
58 |
| -- Registering components. |
59 |
| -- Defining a schema. |
60 |
| -- Loading data. |
61 |
| -- Generating forms. |
62 |
| - |
63 |
| -All while modifying the code of the tutorial itself! How meta! |
64 |
| - |
65 |
| -## Other Examples |
66 |
| - |
67 |
| -Additionally, this repo also contains the following example apps: |
68 |
| - |
69 |
| -- **Simple Example**: build a simple paginated list of movies [[video]](http://docs.vulcanjs.org/example-simple.html). |
70 |
| -- **Movies Example**: like the Simple example, but more in-depth [[video+tutorial]](http://docs.vulcanjs.org/example-movies.html). |
71 |
| -- **Permissions Example**: manage user roles in Vulcan [[video]](http://docs.vulcanjs.org/example-permissions.html). |
72 |
| -- **Instagram Example**: create a simple Instagram clone [[video]](http://docs.vulcanjs.org/example-instagram.html). |
73 |
| -- **Interfaces Example**: using GraphQL interfaces. |
74 |
| -- **Reactions Example**: implement Facebook-style reactions & voting. |
75 |
| -- **Forum Example**: a full-fledged Hacker News-style forum codebase [[docs]](http://docs.vulcanjs.org/example-forum.html). |
76 |
| -- **Customization Example**: how to customize other Vulcan packages, based on the Forum Example [[video+tutorial]](http://docs.vulcanjs.org/example-customization.html). |
77 |
| - |
78 |
| -## Complete Install |
79 |
| - |
80 |
| -The *Complete Install* steps will get you going on a freshly built Ubuntu desktop machine (including installing Node, Meteor, etc.) using the "[two-repo](http://docs.vulcanjs.org/#Two-Repo-Install)" install. |
81 |
| - |
82 |
| -The steps below assume a machine that has not previously been used for software development. |
83 |
| - |
84 |
| -They were tested Oct 15/2017, on an 8Gb Qemu/KVM virtual machine running a freshly installed Xubuntu Desktop 16.04 LTS. |
85 |
| -Expect other environments to behave differently but, sufficiently similar that, adaptation should not be difficult. |
86 |
| - |
87 |
| -#### Critical prerequisite |
88 |
| - |
89 |
| -Note that, to use the scripts below, you **must already have** SSH access to GitHub. You'll need that in any case for properly managing version control of your project. Learn more at [GiHub Bootcamp : Connecting to GitHub with SSH](https://help.github.com/articles/connecting-to-github-with-ssh/) |
90 |
| - |
91 |
| -#### Step 1 - Preparation |
92 |
| - |
93 |
| - # Specify where things should go |
94 |
| - export NEW_PROJECT_NAME="myVulcan"; # a name for your new project |
95 |
| - export PROJECTS_DIRECTORY="${HOME}/projects"; # the installation path for your new project |
96 |
| - export VULCAN_HOME="${PROJECTS_DIRECTORY}/Vulcan"; # the path to the root of your Vulcan installation |
97 |
| - |
98 |
| - # Prepare dependencies |
99 |
| - sudo apt install -y git curl build-essential; |
100 |
| - # Need git for managing your project's source code. |
101 |
| - # Need curl to get the other stuff. |
102 |
| - # Need C++ build tools for fast bcrypt installation |
103 |
| - |
104 |
| - # Install 'meteor' |
105 |
| - curl https://install.meteor.com/ | sh; |
106 |
| - |
107 |
| - # Sanity check your Meteor installation |
108 |
| - echo -e "\nMeteor version..."; |
109 |
| - meteor --version; |
110 |
| - export METEOR_NODE_VERSION=$(meteor node --version); |
111 |
| - echo -e "Meteor Node version...\n ${METEOR_NODE_VERSION}"; |
112 |
| - |
113 |
| - |
114 |
| - # Install 'nvm', so as to be able to easily switch NodeJs versions |
115 |
| - curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.5/install.sh | bash; |
116 |
| - |
117 |
| - # Prepare to use 'nvm' immediately |
118 |
| - export NVM_DIR="$HOME/.nvm" |
119 |
| - [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm |
120 |
| - [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion |
121 |
| - |
122 |
| - |
123 |
| - # Set Meteor version of Node as your default for NodeJS work outside of Meteor |
124 |
| - nvm install ${METEOR_NODE_VERSION}; |
125 |
| - nvm alias default ${METEOR_NODE_VERSION}; |
126 |
| - |
127 |
| - # Create a projects folder and step into it |
128 |
| - mkdir -p ${PROJECTS_DIRECTORY} |
129 |
| - cd ${PROJECTS_DIRECTORY} |
130 |
| - |
131 |
| - # Clone Vulcan core into its own folder and step into it |
132 |
| - git clone [email protected]:VulcanJS/Vulcan.git |
133 |
| - |
134 |
| - # install and pre-cache all of Vulcan's NodeJS dependencies |
135 |
| - cd ${VULCAN_HOME}; |
136 |
| - meteor npm install; |
137 |
| - |
138 |
| -#### Step 2 - Test Vulcan installation |
139 |
| - |
140 |
| - Check it works with a browser at http://localhost:3033 |
141 |
| - then kill it with <ctrl-c> |
142 |
| - |
143 |
| - # Run Vulcan so it pre-caches all its Meteor dependencies |
144 |
| - [ -f settings.json ] || cp sample_settings.json settings.json; |
145 |
| - meteor --port 3033 --settings settings.json; |
146 |
| - |
147 |
| - |
148 |
| -#### Step 3 - Prepare your project |
149 |
| - |
150 |
| - cd ${PROJECTS_DIRECTORY}; |
151 |
| - |
152 |
| - # Clone Vulcan starter kit as your named project |
153 |
| - git clone [email protected]:VulcanJS/Vulcan-Starter.git ${NEW_PROJECT_NAME} |
154 |
| - |
155 |
| - # Step in your project folder |
156 |
| - cd ${NEW_PROJECT_NAME}; |
157 |
| - |
158 |
| - # Make sure your app uses the same Meteor release as Vulcan |
159 |
| - cp ${VULCAN_HOME}/.meteor/release ./.meteor; |
160 |
| - |
161 |
| - # install and pre-cache all of your named app's NodeJS dependencies |
162 |
| - # meteor npm install --save cross-fetch; |
163 |
| - meteor npm install; |
164 |
| - |
165 |
| - # Tell Meteor to refer to the Vulcan sister folder for packages that Vulcan supplies |
166 |
| - export METEOR_PACKAGE_DIRS=../Vulcan/packages; |
167 |
| - echo "Vulcan's Meteor packages folder : ${METEOR_PACKAGE_DIRS}."; |
168 |
| - |
169 |
| -#### Step 4 - Test your project installation |
170 |
| - |
171 |
| - Check it works with a browser at http://localhost:3000 |
172 |
| - then kill it with <ctrl-c> |
173 |
| - |
174 |
| - # Run your Vulcan project |
175 |
| - [ -f settings.json ] || cp sample_settings.json settings.json; |
176 |
| - meteor --port 3000 --settings settings.json |
177 |
| - |
| 10 | +App: [127.0.0.1:3000](http://127.0.0.1:3000/) (Github OAuth doesn't work on localhost:3000) |
178 | 11 |
|
| 12 | +GraphiQL: [127.0.0.1:3000/graphiql](http://127.0.0.1:3000/graphiql) |
0 commit comments