elixir & vue setup (1)
elixir & vue setup (1)
GitHub download:
1.https://git-scm.com/downloads
Frontend Setup:
1] Nodejs download and install for LTS format
Download Link: https://nodejs.org/en/download/
2] Create Clone And Branch:
Clone:
1. git clone (go to github copy code link and paste)
Branch:
1. git branch *branchname* - to create new branch
2. git checkout *branchname* - switch to your branch
3. git branch - to check which is the current branch
Run Vue Server:
1. npm install - to install deps / newly added deps
2. npm run serve - to start the server
Ex:
Backend Setup:
1] vs code tools 2022 :
1.https://visualstudio.microsoft.com/downloads/
2] erlong otp 24 install:
1.https://www.erlang.org/patches/otp-24.0
3] elixir install:
1.https://elixir-lang.org/install.html#windows [version 1.13.0]
4] postgres 12 install (two times install):
Hints: postgres and dbeaver give same password
1.enterprisedb.com/postgresql-tutorial-resources-training?uuid=03b13357-9281-4985-
baea-17b72a0febc3&campaignId=7012J000001F5IIQA0
5] dbeaver install:
1.https://dbeaver.com/docs/wiki/Data-transfer/22.3/
6] Create Clone And Branch:
Clone:
1. git clone (go to github copy code link and paste)
Branch:
1. git branch *branchname* - to create new branch
2. git checkout *branchname* - switch to your branch
3. git branch - to check which is the current branch
Run Elixir Server:
1. mix deps.get -> get dependencies
2. mix deps.compile -> compiles
3.mix phx.server -> for running the server
Compile error :
Use this comments:
cmd /K "C:\Program Files\Microsoft Visual
Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
cmd /K "C:\Program Files\Microsoft Visual
Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
cmd /K "C:\Program Files (x86)\Microsoft Visual
Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
psql -U postgres
create user tectaliktrade;
alter user tectaliktrade with encrypted password 'tectaliktrade@123';
GRANT ALL PRIVILEGES ON DATABASE tectalik_trade_api_dev to tectaliktrade ;
ALTER USER tectaliktrade WITH SUPERUSER;
belongs_to Elixir :
1] cmd prompt:
public -> mix ecto.gen.migration <<your desc>>
tenant -> mix triplex.gen.migration <<your desc>>
ex: mix triplex.gen.migration alter_first_table
2] alter table(:customer) do
add :routeno_id, references(:routeno, on_delete: :nothing)
end
3] belongs_to :routeno, RouteNo for customer.ex
4] routeno_id: customer.routeno_id, for customer.view
5] Mix ecto.migrate or Mix triplex.migrate
Alter_table Query:
1] cmd prompt:
public -> mix ecto.gen.migration <<your desc>>
tenant -> mix triplex.gen.migration <<your desc>>
ex: mix triplex.gen.migration alter_table_name
2] def change do
alter table("customer") do
add :ucc_name, :string
end
end
3] add col_name for customer.ex
4] add field for customer_view.ex
5] Mix ecto.migration or Mix triplex.migration