gofastapi
v0.0.8
Published
Install this package globally on your computer ```bash npm i -g gofastapi ```
Readme
GoFastAPI CLI
Install this package globally on your computer
npm i -g gofastapiIf you already have it installed, and want to get the latest version
npm update -g gofastapiCommands
1. Login
gofastapi login --auth-token=<YOUR_AUTH_TOKEN>Contact us to get your token, which is used to authenticate you with the GoFastAPI platform. This token is stored in .gofastapi/.env file, and is not pushed to any version control platform like github.
2. Init
Every application you build will require .gofastapi/app.json with configurations on how the application will be deployed. Most of the configuration is implicit, and only key no-default items are included in the .gofastapi/app.json.
gofastapi initUsing that command, you can create new project and a new app. And select one of the app types that we currently support. (We're adding support for a lot more, very soon.)
3. Deploy
gofastapi deployDuring this process, this tool creates some files inside the .gofastapi directory to install the dependencies, package the source code, and compress any static files the app has (depending on the app type). Users do not need to interact with these files directly, and they're local and will not be pushed to any version control platform like github.
4. Clean
gofastapi cleanIf something fails during the deployment, or if the cache is corrupted, you can use the clean command to delete all the local files that this tool created inside the .gofastapi directory.
app.json
{
"version": "<CONFIGURATION_VERSION_FOR_INTERNAL_PURPOSES>",
"project_id": "<YOUR_GOFASTAPI_PROJECT_ID>",
"app_id": "<YOUR_GOFASTAPI_APP_ID>",
"app_type": "<GOFASTAPI_APP_TYPE>",
"deploy": {
"target_dir": "<STATIC_FILES_DIR>"
}
}The deploy property inside the .gofastapi/app.json is optional and its value depends on the app type. For example, deploy.target_dir is used for static_site where the build files are written. For example, for react applications, it could be ./dist or ./out.
App types
static_site
template:
python_flask
template: https://github.com/gofastapi/template-flask
python_fastapi
template: https://github.com/gofastapi/template-fastapi
python_django
template: https://github.com/gofastapi/template-django
node_express
template: https://github.com/gofastapi/template-express
