Generate a new Elixir project using mix
and add cowboy
and plug
as dependencies in mix.exs
:
defp deps do
[
{:cowboy, "~> 1.0.0"},
{:plug, "~> 0.8.1"}
]
end
# input: fullchain.pem and privkey.pem as generated by the "letsencrypt-auto" script when run with | |
# the "auth" aka "certonly" subcommand | |
# convert certificate chain + private key to the PKCS#12 file format | |
openssl pkcs12 -export -out keystore.pkcs12 -in fullchain.pem -inkey privkey.pem | |
# convert PKCS#12 file into Java keystore format | |
keytool -importkeystore -srckeystore keystore.pkcs12 -srcstoretype PKCS12 -destkeystore keystore.jks | |
# don't need the PKCS#12 file anymore |
import React from 'react' | |
import {observer} from 'mobx-react' | |
import {observable} from 'mobx' | |
const state = observable({ | |
value: 0 | |
}) | |
const Comp = (props) => { | |
return <div onClick={() => state.value++}>click to increase counter value: {state.value}</div> |
def index(conn, %{"event" => "true"}) do | |
conn = conn | |
|> put_resp_content_type("text/event-stream") | |
|> send_chunked(200) | |
{:ok, conn} = chunk(conn, ["data: ", JSON.encode!(Thermostat.Data.get()), "\n\n"]) | |
Phoenix.Topic.subscribe self, "data" | |
data_updated(conn) | |
end | |
defp data_updated(conn) do |
Generate a new Elixir project using mix
and add cowboy
and plug
as dependencies in mix.exs
:
defp deps do
[
{:cowboy, "~> 1.0.0"},
{:plug, "~> 0.8.1"}
]
end
defmodule Absinthe.Ecto.Resolution.Schema do | |
@moduledoc """ | |
This module provides helper functions to resolve a GraphQL query into `Ecto.Query`. | |
""" | |
import Absinthe.Resolution.Helpers | |
import Ecto.Query | |
alias Absinthe.Resolution | |
alias Absinthe.Blueprint.Document.Field |
// This file allows us to inspect the traffic going over the Native <-> JS bridge, and can be | |
// helpful for debugging. Setting this to true should never be committed to git | |
const ENABLE_BRIDGE_DEBUGGER = false; // <-- THIS SHOULD NOT BE TRUE IN MASTER!!!! | |
// if true, function arguments will get pretty printed | |
const PRETTY_PRINT = false; | |
// enable this if you want to ignore EVERY event, except for the ones that match the `FOCUSED_*` | |
// constants. If true, you configure what you want to see. If false, you configure what you DONT | |
// want to see. |
# Customise this file, documentation can be found here: | |
# https://github.com/fastlane/fastlane/tree/master/fastlane/docs | |
# All available actions: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Actions.md | |
# can also be listed using the `fastlane actions` command | |
# Change the syntax highlighting to Ruby | |
# All lines starting with a # are ignored when running `fastlane` | |
# If you want to automatically update fastlane if a new version is available: | |
# update_fastlane |
--- | |
format_version: 1.1.0 | |
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git | |
app: | |
envs: | |
- BITRISE_PROJECT_PATH: ios/pro_mobile.xcodeproj | |
opts: | |
is_expand: false | |
- BITRISE_SCHEME: pro_mobile | |
opts: |
--- | |
format_version: 1.1.0 | |
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git | |
trigger_map: | |
- push_branch: qa | |
workflow: qa | |
workflows: | |
_init_install: | |
steps: | |
- activate-ssh-key: |
defmodule ApiWeb.Schema do | |
use Absinthe.Schema | |
import Absinthe.Resolution.Helpers | |
import_types Absinthe.Type.Custom | |
@desc "A user" | |
object :user do | |
field :id, non_null(:string) |