Skip to content

Commit

Permalink
mix
Browse files Browse the repository at this point in the history
  • Loading branch information
5HT committed Jul 9, 2019
1 parent 894f508 commit d1d12b2
Show file tree
Hide file tree
Showing 7 changed files with 81 additions and 13 deletions.
19 changes: 19 additions & 0 deletions config/config.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
use Mix.Config

config :n2o,
pickler: :n2o_secret,
app: :bank,
mq: :n2o_syn,
port: 8041,
mqtt_services: ['erp', 'plm'],
ws_services: ['chat'],
protocols: [:n2o_heart, :n2o_nitro, :n2o_ftp, :bpe_n2o],
routes: :bank_route

config :kvs,
dba: :kvs_rocks,
dba_st: :kvs_st,
schema: [:kvs, :kvs_stream, :bpe_metainfo, :bank_kvs]

config :form,
registry: [:bpe_row,:bpe_trace,:bpe_otp,:bpe_act]
39 changes: 39 additions & 0 deletions mix.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
defmodule BANK.Mixfile do
use Mix.Project

def project() do
[
app: :bank,
version: "0.7.0",
description: "BANK Financial Management",
package: package(),
elixir: "~> 1.7",
deps: deps()
]
end

def package() do
[
files: ~w(doc include priv src mix.exs LICENSE),
licenses: ["ISC"],
links: %{"GitHub" => "https://github.com/synrc/bank"}
]
end

def application(),
do: [mod: {:bank, []}, applications: [:rocksdb, :ranch, :cowboy, :kvs, :syn, :n2o]]

def deps() do
[
{:ex_doc, "~> 0.20.2", only: :dev},
{:cowboy, "~> 2.5"},
{:rocksdb, "~> 1.2.0"},
{:bpe, "~> 4.7.3"},
{:nitro, "~> 4.7.3"},
{:form, "~> 4.7.0"},
{:syn, "~> 1.6.3"},
{:n2o, "~> 6.7.4"},
{:kvs, "~> 6.7.4"}
]
end
end
12 changes: 12 additions & 0 deletions rebar.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{deps_dir, "deps"}.

{deps, [{bpe, ".*", {git, "git://github.com/synrc/bpe", []}},
{nitro, ".*", {git, "git://github.com/synrc/nitro", []}},
{bert, ".*", {git, "git://github.com/synrc/bert", {tag,"2.5"}}},
Expand All @@ -8,4 +9,15 @@
{rocksdb, ".*", {git, "git://github.com/voxoz/rocks", []}},
{form, ".*", {git, "git://github.com/synrc/form", []}},
{kvs, ".*", {git, "git://github.com/synrc/kvs", []}}]}.

{erl_opts, [nowarn_unused_function,nowarn_duplicated_export]}.

{relx, [{release, {bank, "0.7.0"},[bank]},
{dev_mode, false},
{sys_config, "sys.config"},
{vm_args, "vm.args"},
{include_erts, true},
{extended_start_script, true}]}.

{shell,[{config, "sys.config"},
{apps, [bank]}]}.
2 changes: 1 addition & 1 deletion src/bank.app.src
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{description, "FIN Account Management"},
{vsn, "0.6.0"},
{registered, []},
{applications, [public_key,asn1,kernel,stdlib,mnesia,syntax_tools,compiler,xmerl,kvs,syn,n2o,bpe,form]},
{applications, [public_key,asn1,kernel,stdlib,rocksdb,mnesia,ranch,cowboy,nitro,syntax_tools,compiler,xmerl,kvs,syn,n2o,bpe,form]},
{mod, { bank, []}},
{env, []}
]}.
4 changes: 1 addition & 3 deletions src/bank.erl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,5 @@
-export([start/2, stop/1, init/1]).
stop(_) -> ok.
init([]) -> {ok, { {one_for_one, 5, 10}, []} }.
start(_,_) -> kvs:join(),
cowboy:start_tls(http, n2o_cowboy:env(?MODULE),
#{env => #{dispatch => n2o_cowboy2:points()} }),
start(_,_) -> cowboy:start_tls(http, n2o_cowboy:env(bank), #{env => #{dispatch => n2o_cowboy2:points()} }),
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
16 changes: 8 additions & 8 deletions src/xforms/bpe_validation.erl
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
-module(bpe_validation).
-author('Maxim Sokhatsky <[email protected]>').
-compile(export_all).
-include_lib("bank/include/bank/otp.hrl").
-include_lib("bank/include/bank/phone.hrl").
-include_lib("bank/include/bank/sid.hrl").
-include_lib("bank/include/bank/transaction.hrl").
-include_lib("bank/include/bank/currency.hrl").
-include_lib("bank/include/bank/client.hrl").
-include_lib("bank/include/bank/account.hrl").
-include_lib("bank/include/bank/card.hrl").
-include("bank/otp.hrl").
-include("bank/phone.hrl").
-include("bank/sid.hrl").
-include("bank/transaction.hrl").
-include("bank/currency.hrl").
-include("bank/client.hrl").
-include("bank/account.hrl").
-include("bank/card.hrl").
-include_lib("form/include/meta.hrl").
-include_lib("bpe/include/bpe.hrl").

Expand Down
2 changes: 1 addition & 1 deletion vm.args
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-name bpe@127.0.0.1
-name bank@127.0.0.1
-setcookie node_runner
+K true
+A 5
Expand Down

0 comments on commit d1d12b2

Please sign in to comment.