Skip to content
This repository has been archived by the owner on Nov 14, 2019. It is now read-only.

Crank up webserver #80

Merged
merged 9 commits into from
Oct 24, 2016
Merged

Crank up webserver #80

merged 9 commits into from
Oct 24, 2016

Conversation

mgwalker
Copy link
Member

@mgwalker mgwalker commented May 24, 2016

Uses botkit's built-in express to start a web server, give it a static route at /lib/web/static, and dynamically ingest and create API endpoints as defined in /lib/web/api. This is very much intended to qualify as an MVP. The details of how the API endpoints are defined etc. is up for discussion. Likewise the static content - e.g., should it be generated by a template engine so we don't have a ton of repeated code? Etc, etc.

Needed for:

@codecov-io
Copy link

Current coverage is 81.68%

Merging #80 into develop will not change coverage

@@            develop        #80   diff @@
==========================================
  Files            25         25          
  Lines           595        595          
  Methods         106        106          
  Messages          0          0          
  Branches         94         94          
==========================================
  Hits            486        486          
  Misses          109        109          
  Partials          0          0          

Powered by Codecov. Last updated by f0aeabb...b450719

@codecov-io
Copy link

codecov-io commented May 24, 2016

Current coverage is 81.68%

Merging #80 into develop will not change coverage

@@            develop        #80   diff @@
==========================================
  Files            25         25          
  Lines           595        595          
  Methods         106        106          
  Messages          0          0          
  Branches         94         94          
==========================================
  Hits            486        486          
  Misses          109        109          
  Partials          0          0          

Powered by Codecov. Last updated by f0aeabb...a2a7d01

@mgwalker
Copy link
Member Author

Went ahead and added Mustache templating.

@stvnrlly
Copy link
Member

This is nice. I think that the glossary part is ready for merging, but I want to set up auth before adding in the API. Should we just work on this in this branch, or split that off?

@mgwalker
Copy link
Member Author

My intent was just to get a bare-bones server up with the basic structure for serving up documentation and an API, and then fill in content later. So we'd merge this, then you and I could work independently on documentation and API.

It's fine to merge this now, but FWIW I've changed up the documentation stuff a fair bit. Up to you if you want to merge now and the new stuff later, or I can push up these changes now. Only the content isn't ready, but that's exactly what's meant to come later. 😛

… Github; use mustache for the templateable parts of the index file
@mgwalker
Copy link
Member Author

You didn't respond or merge before I could do otherwise, so I went ahead and put in the markdown/mustache changes. The API stuff is all the same, though.

@stvnrlly
Copy link
Member

I think I'm going to take a quick crack at adding authentication, since as it is anybody could get a partial list of our Slack channels via the API. If it turns out to be anything substantial, I'll break that off and merge the rest.

@mgwalker
Copy link
Member Author

Oh, right... If it's helpful to you, you can look at air traffic control. It does OAuth with Trello, but you could swap out the Trello strategy with the Slack one (https://www.npmjs.com/package/passport-slack) and it should be pretty straightforward from there.

https://github.com/18F/internal-air-traffic-control/tree/develop/server

@stvnrlly
Copy link
Member

stvnrlly commented Oct 21, 2016

Okay! Picking this up again, here are the few things that I think will make this ready to go:

  • Remove channel API for now, until we can figure out how to manage access
  • Update the Web Design Standards to the latest version

Beyond those, there are a few things that don't preclude merging, and may be things to do beyond MVP:

  1. Should the landing page be about how to install this on your own Slack, and things like the glossary moved to their own pages?
  2. It looks like we can set the static dir directly now.
  3. I'm curious about the approach to generating the site. Would it make sense to use something like mustache-express and just have Express discover the templates? And within the templates, would it make sense to use partials instead of explicitly building them?
  4. We may want to get assistance in our documentation again, to make sure that it's clear and helpful to users.

@mgwalker
Copy link
Member Author

Did the two tasks, and dealt with "to-be-considered" 2 as well. There's another branch with a more fleshed-out site, but it depends on this so I never opened the PR for it. Once this gets merged, I'll open that one.

@stvnrlly
Copy link
Member

Cool. All those other questions can move with us over to the new PR, if necessary.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants