A cli to setup, and generate new components for, a thruster app

Still a work in progress, so please report bugs!

thruster-cli

.

Installation

  • Clone this repository
  • Run:
> cargo install --path . --force

Quick Start

To make a simple project with a "Messages" model, simply run:

> thruster-cli init test-project
> thruster-cli component message
> thruster-cli migrate

To develop locally (i.e. faster build,) run

> docker-compose up -d postgres
> cargo run

Or, to use docker entirely, you can run

> docker-compose up

Useage

Creating a new project

This will create a new project using:

  • thruster
  • Postgres
  • Diesel.rs
  • Relevant docker files
> thruster-cli init ProjectName

Note: This installs the project pointing towards the default database of

DATABASE_URL=postgres://[email protected]/ProjectName

This can be updated at any time in the generated .env file.

Creating a new component

> thruster-cli component User
> thruster-cli migrate

Running migrate is important because it generates schema populated from the database.

Running the app

The whole app is initialized using docker and docker-compose, so you can simply run:

> docker-compose up

If you prefer to run outside of a container, you can run

> cargo run

Just like a normal rust project. Make sure you have postgres running as well so your server has a DB!

Using for async

Commands are the same, just add --async as a flag! For example,

> thruster-cli init --async ProjectName
> thruster-cli component --async SomeComponent
Issues

Collection of the latest Issues

JPRoland

JPRoland

0

I was messing around with Thruster and noticed that CLI doesn't handle pluralizing component names very well. It just adds an s to the end of the word, even if the word already ends with an s. Running the example command to create a Users component results in a userss.rs model file and userss table name, as well as a userss component directory.

I know it doesn't really affect how anything works, it just ends up looking odd.

The Inflector crate, appears to be able to handle pluralizing words, as well as supporting changing between different cases and many other word transformations.

If you're open to pull requests I could take a crack at incorporating that crate, or possibly just making a pluralize function, but using the crate would be much easier thanks to the wonderful weirdness of the English language.

Information - Updated Jun 28, 2022

Stars: 9
Forks: 3
Issues: 4
Misc

248

A CLI tool to easily get a new project up and running by using pre-made...

A rust cross platform rust boilerplate template to get up and running quickly

A CLI tool to easily get a new project up and running by using pre-made...

Note: you probably don't need to use this project

longer necessary to run by hand, nor do you need the wasm-gc executable

Note: you probably don't need to use this project

Startup code and minimal runtime for Cortex-M microcontrollers

This project is developed and maintained by the Documentation

Startup code and minimal runtime for Cortex-M microcontrollers

wasamtime is a standalone runtime to bring compiled code to modern web browsers

Bytecode Alliance project with oveer 6k+ stars and a wide developer community

wasamtime is a standalone runtime to bring compiled code to modern web browsers

This is a toy async runtime and minimal HTTP server written in Rust as a...

This is a toy async runtime and minimal HTTP server written in Rust as a project to learn about async runtimes and Recurse Center's programmer...

This is a toy async runtime and minimal HTTP server written in Rust as a...

Science fiction space trading/smuggling simulation game using procedural generation

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes

Science fiction space trading/smuggling simulation game using procedural generation

A simple poll application that is intended to be easy to self-host

This is a personal project that I run at its current version and (lack of) stability, but it may not meet your production standards

A simple poll application that is intended to be easy to self-host

bevy_egui_web_showcase

An example project running on Running

bevy_egui_web_showcase

bevy_megaui_web_showcase

An example project running on Running

bevy_megaui_web_showcase

This React app was initialized with create-near-app

To run this project locally:

This React app was initialized with create-near-app
Facebook Instagram Twitter GitHub Dribbble
Privacy