Start project: Difference between revisions

From Izara Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 37: Line 37:
* [[API Hdr]]
* [[API Hdr]]
* [[SQS DSQ Hdr]]
* [[SQS DSQ Hdr]]
* [[INV Hdr]]


== set initial setup ==
== set initial setup ==

Revision as of 04:44, 19 October 2023

Start Project For Beginner

prepare project to local

  • BitBucket account.
  1. fork repository to own workspace
  2. clone repository to local
git clone git@bitbucket.org:your_repository_path.git
  • Local Computer add workspace in VS code.
  1. open VS Code => File/Add Folder to Workspace...
  2. choose your project
  • set SSH of BitBucket
  1. sudo apt update && sudo apt install openssh-client
  2. sudo dnf install openssh-clients
  3. ssh -V
  4. ssh-keygen -t ed25519 -b 4096 -C "{penpitcha4289@gmail.com}" -f {penpitcha_workspace}

add SSH key in key.pub that generate above into SSH of repository in BitBucket
https://support.atlassian.com/bitbucket-cloud/docs/set-up-personal-ssh-keys-on-linux/

prepare resource and app

Example Data for project: https://izara.io/wiki/index.php/Service_-_Product_Manager

  • install package
example: in app

npm i @izara_project/izara-middleware
npm i @izara_project/izara-shared

//* install more see in package.json

Example:

set initial setup

in app/initial_setup

start deploy to AWS server

  • in config
  1. iz_serviceName for beginner test => Service{YourName} ex: ServicePraew => if your project => ProductManager
  2. iz_region for beginner test will use region => ap-southeast-2 //sydney => if your project will use region => us-east-2
  • Config credentials aws, can run on home directory
  1. check version
sls --version
aws --version
  • Install the AWS CLI version 2 (window)
msiexec.exe /i https://awscli.amazonaws.com/AWSCLIV2.msi

ref: https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-windows.html

  • find Access Key and Secret Access Key

create Access key 1 from AWS server => User => your User Name

  • configuration
aws configure

show:

AWS Access Key ID [None]: AKIAIOSFODNN7EXAMPLE  // ***YOUR ID
AWS Secret Access Key [None]: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY //***YOUR KEY
Default region name [None]: us-east-2 // Ohio
Default output format [None]: json
  • deploy repository

deploy resource before app

sls deploy --verbose

Test

Example request for test Api|Sqs|Dqs handler