You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+46-1
Original file line number
Diff line number
Diff line change
@@ -31,10 +31,13 @@ cd civil-pursuit
31
31
npm install
32
32
33
33
```
34
+
34
35
For the first stages of this project, we will be focusing on storybook
36
+
35
37
```
36
38
npm run storybook
37
39
```
40
+
38
41
### MongoDB
39
42
40
43
This app uses MONGODB and you will need a mongodb uri to get started. Cloud.mongodb.com has free accounts, you can go there and follow these [instructions](https://docs.google.com/presentation/d/10fEk_OdfN-dYh9PlqG6nTFlu4ENvis_owdHbqWYDpBI/present?slide=id.gb4a0dbf10b_0_93)
Note that it's confusing but user-name and db-name can be anything. You pick them when you create the database, and you use them in this URI string. That's all.
49
52
50
53
After you get Mongo setup, you also need these ENV variable in your .bashrc file
54
+
51
55
```
52
56
export NODE_ENV="development"
53
57
export SYNAPP_ENV="alpha"
54
58
export MONGODB_URI=$MONGODB_URI
55
59
```
60
+
56
61
Then you should be able to run the development server. You may also need to `source .bashrc` first.
62
+
57
63
```
58
64
npm run dev
59
65
```
66
+
60
67
It should startup. You will be able to browse to [localhost:3011/](localhost:3011/) but there won't be anything useful in the database.
61
68
So after you get this far, request a link to the "civil-pursuit-template" google drive directory where there is a bunch of db records and a README file that explains how to put it into the database.
62
69
63
70
Then you can browse to [localhost:3011/item/pvote](localhost:3011/item/pvote) and see the discussion.
64
71
65
72
### Dev Environment for Easy Project Switching
73
+
66
74
This project uses bash. This models the cloud environment. The .bashrc file in the each project's directory can contain custom environment variables and aliases and such for the project. This is where we put secrets becasue the .bashrc file is ignored by .gitignore and won't be put in the repo.
67
75
68
76
These steps will make it easy to switch between multiple projects and repos, but automatically running the .bashrc file in a project when you start bash in that directory.
69
77
70
-
In your home (cd ~) directory find or create a **.bash_profile** on PC or a **.profile** on mac and add this to it. If neither exist, create both just to be sure.
78
+
In your home (cd ~) directory find or create a **.bash_profile** on PC or a **.profile** on mac and add this to it. If neither exist, create both just to be sure.
71
79
72
80
```
73
81
if [`pwd` != $HOME ] && [[ -f "./.bashrc" ]]; then
74
82
echo running `pwd`/.bashrc
75
83
source ./.bashrc
76
84
fi
77
85
```
86
+
78
87
This works great when you open a terminal in a project directory, for example when you are using visual studio code.
79
88
89
+
# Icons, Figma and SVG
90
+
91
+
<details>
92
+
<summary>You can export svg from figma and paste it into a .svg file in assets/svg to create icons.</summary>
This project will automatically convert the files in assets/svg into react.js files in app/svgr on install. After you add a new file you can manually trigger the conversion with:
106
+
107
+
```
108
+
npm run svgr
109
+
```
110
+
111
+
Then you can use these svg files as React components in your code like this:
112
+
113
+
```
114
+
import TrashCan from '../svgr'
115
+
116
+
function renderSomething(){
117
+
return <SvgTrashCan />
118
+
}
119
+
```
120
+
121
+
</details>
122
+
123
+
#
124
+
80
125
# The rest of this is from the old README file and may be dated
0 commit comments