Skip to content

Commit

Permalink
Merge pull request #39 from lexara-prime-ai/dev
Browse files Browse the repository at this point in the history
Bumped crate version
  • Loading branch information
irfanghat authored Jul 16, 2024
2 parents 55afd7a + 92f360b commit c4e268c
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rust/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "render_cdk"
version = "0.0.5"
version = "0.0.6"
edition = "2021"
authors = ["Irfan Ghat"]
description = "This crate provides a streamlined interface for interacting with Render, a platform that allows you to build, deploy, and scale your apps with ease."
Expand Down
50 changes: 25 additions & 25 deletions rust/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ async fn main() {
/// 1. Querying for deployed Services.
///
/// List all Services.
// let services = ServiceManager::list_all_services("20").await;
let services = ServiceManager::list_all_services("50").await;

/// List all Services by Name and Type.
// let services = ServiceManager::find_service_by_name_and_type("whoami", "web_service").await;
Expand Down Expand Up @@ -46,37 +46,37 @@ async fn main() {
.map(|owner_response| owner_response.owner.id.clone())
.expect("No authorized users found.");

/// 4. Creating services.
// /// 4. Creating services.
// The following is a sample deployment configuration.
let deployment_config = template::Template {
type_: "static_site".to_owned(), // Options ->
name: "test_deployment".to_owned(),
owner_id,
repo: "https://github.com/lexara-prime-ai/SAMPLE_STATIC_SITE".to_owned(),
auto_deploy: "yes".to_owned(),
branch: None,
image: None,
build_filter: None,
root_dir: "./public".to_owned(),
env_vars: vec![],
secret_files: vec![],
service_details: Some(ServiceDetails {
build_command: None,
headers: vec![],
publish_path: Some("./".to_owned()),
pull_request_previews_enabled: Some("yes".to_owned()),
routes: vec![],
}),
};
// let deployment_config = template::Template {
// type_: "static_site".to_owned(), // Options ->
// name: "test_deployment".to_owned(),
// owner_id,
// repo: "https://github.com/lexara-prime-ai/SAMPLE_STATIC_SITE".to_owned(),
// auto_deploy: "yes".to_owned(), // By default, Render automatically deploys your service whenever you update its code or configuration.
// branch: None,
// image: None,
// build_filter: None,
// root_dir: "./public".to_owned(),
// env_vars: vec![],
// secret_files: vec![],
// service_details: Some(ServiceDetails {
// build_command: None, // Render runs this command to build your app before each deploy e.g npm run build, yarn build.
// headers: vec![],
// publish_path: Some("./".to_owned()), // This will translate to /public/
// pull_request_previews_enabled: Some("yes".to_owned()),
// routes: vec![],
// }),
// };

//////////////////////////
// [DEBUG] logs.
/////////////////////////
// println!("Deployment Config.: {:?}\n", deployment_config);

let service = ServiceManager::create_service(deployment_config)
.await
.unwrap();
// let service = ServiceManager::create_service(deployment_config)
// .await
// .unwrap();

///////////////////////////////
// Other sample configurations.
Expand Down

0 comments on commit c4e268c

Please sign in to comment.