2018-03-09 21:29:00 -05:00
[](https://travis-ci.org/metamaps/metamaps-ui)
2016-08-01 02:51:06 +08:00
2018-03-11 16:24:57 -04:00
Make sure you're running a good up to date LTS version of `node`
Install all the dependencies
`$ npm install`
2016-08-01 02:51:06 +08:00
2018-03-08 18:45:22 -05:00
Make sure you have `node-sass` installed
`$ npm install -g node-sass`
2016-08-01 02:51:06 +08:00
2018-03-11 16:24:57 -04:00
Make sure that you have a .env file setup. You can copy the .example-env
```
$ cp .example-env .env
```
Edit it however you need to.
Start up the nodejs server which serves the UI files, the socketio realtime server, and proxies requests to the API.
2018-03-03 15:57:02 -05:00
```
2018-03-11 16:24:57 -04:00
$ npm start
2018-03-03 22:52:41 -05:00
```
2018-03-11 18:33:36 -04:00
Build the css. If you're developing and writing css, make sure that it will rebuild the css when you make changes, by running the `npm sass:watch` process and leaving it running.
2018-03-04 19:30:17 -05:00
```
2018-03-11 18:33:36 -04:00
$ npm run sass # to build the css once
$ npm run sass:watch # to watch it for more changes
2018-03-04 19:30:17 -05:00
```
2018-03-11 16:24:57 -04:00
Run the metamaps api in another terminal, on whichever port you configured in your .env file.
2018-03-08 18:45:22 -05:00
For now, make sure you are running on the `add-user-route` branch of Metamaps, and that it's up to date with the latest on that branch
2018-03-06 08:58:28 -05:00
`$ rails s -p 3001`
2018-03-08 18:45:22 -05:00
open up http://localhost:3000 and start coding!
2018-03-06 08:58:28 -05:00
Checklist
- [x] Get the Import lightbox working, and not conflicting on screen
- [x] Handling CSRF
- [x] Fix images referenced in the JS
- [x] Figure out how authentication of requests from the frontend to the API works
- [x] Figure out how to combine the nodejs realtime server into server.js
2018-03-07 18:41:04 -05:00
- [x] Notifications: make sure loading states are working for popup and page
2018-03-08 09:46:05 -05:00
- [x] Request unreadNotificationCount
- [x] Request invite code
- [x] Request user object itself
- [x] Load the metacodes
2018-03-08 10:43:39 -05:00
- [x] move ImportDialog lightbox into main app
2018-03-08 10:22:11 -05:00
- [x] create topic form
2018-03-08 12:09:23 -05:00
- [x] Fork map lightbox / component
2018-03-11 18:52:40 -04:00
- [x] lightboxes
- [x] About lightbox
- [x] Notifications: Request unreadNotificationCount
- [x] notifications list
- [x] notification page
- [x] list metacodes
- [x] new metacode
- [x] edit metacode
- [x] list metacode_sets
- [x] new metacode set
- [x] edit metacode set
2018-03-08 10:43:39 -05:00
2018-03-08 18:35:47 -05:00
- [ ] fix other places where metacode sets are used
2018-03-11 18:58:01 -04:00
- [ ] page titles
- [ ] mobile titles
- [ ] open graph meta tags
2018-03-08 18:35:47 -05:00
- [ ] make newtopic form load metacodes from users selected ones
2018-03-08 09:46:05 -05:00
- [ ] create synapse form
2018-03-08 10:43:39 -05:00
- [ ] replace old loader with react loader
- [ ] ensure exports of maps work
2018-03-07 15:35:27 -05:00
- [ ] Notifications: make sure notifications either look nice, or redirect
- [ ] Notifications: pagination
2018-03-07 18:42:47 -05:00
- [ ] Notifications: CSS fixes related to 'controller-x' in body classes
2018-03-07 18:41:04 -05:00
- [ ] Make sure loading state for explore maps pages work
2018-03-06 08:58:28 -05:00
- [ ] Get actioncable working
2018-03-08 09:46:05 -05:00
- [ ] Switch Metacodes lightbox / component
2018-03-08 07:26:04 -05:00
- [ ] break up index.html into parts
2018-03-06 08:58:28 -05:00
- [ ] Handle CSS metacode colors
- [ ] Fix Request An Invite page
- [ ] Make 'new map' action work
- [ ] Modify the remaining rails templates into JSX templates
- [ ] authorized apps
- [ ] registered apps
- [ ] authorize
- [ ] user passwords
- [ ] Modify the RubyOnRails app to only serve JSON responses, no HTML pages anymore
- [ ] Modify the frontend to request that data from the API which is necessary at first to load the page
2018-03-08 18:35:47 -05:00
- [x] Load the metacode sets
2018-03-08 18:45:22 -05:00
To run the server as a daemon that will be re-run if it crashes, you can
use the forever node package.
```
$ npm install -g forever
$ forever start server.js
2018-03-11 18:33:36 -04:00
```
To build the javascript file
`$ npm run build`