Use fasty-cli to work on your project locally

Fasty comes with a npm cli tool called fasty-cli

To install it just run :

npm install -g fasty-cli

Set up a new git repo for your fasty/git folder so your content won't be on the main fasty repository. This git folder us gitignored tho :)
 Then within your fasty/git/ folder run :

fasty -w

It will then listen for your folder's changes.

The app structure is like that : 

lua # this folder can contains any lua files to surcharge the Lapis app
db_demo # each database has it's own content
├── app # app folder
│   ├── aqls # Manage your complex AQLs here 
│   ├── apis # apis folder contains your arangodb foxx services
│   │   ├── api_v1
│   │   │   ├── main.js
│   │   │   ├── manifest.json
│   │   │   ├── package-lock.json
│   │   │   ├── package.json
│   │   │   ├── routes
│   │   │   │   └── auth.js
│   │   │   └── scripts
│   │   │       ├── send-mail.js
│   │   │       ├── send-raw-mail.js
│   │   │       └── setup.js
│   ├── components # you can create as many riots js components you like
│   │   ├── uploads 
│   │   │   ├── uploads.js
│   │   │   ├── uploads.riot
│   │   │   └── uploads.yml
│   ├── layouts # manage as many layouts you need for your ap
│   │   └── home
│   │       ├── index.html
│   │       ├── js.js
│   │       ├── settings.yml
│   │       └── vendor.js
│   ├── pages # manage your pages (only the raw html code is editable (and settings too))
│   │   ├── auth.yml
│   │   ├── auth_fr.html
│   │   ├── home.yml
│   │   └── home_fr.html
│   ├── partials # manage your etlua partials
│   │   ├── layout
│   │   │   ├── aside.etlua
│   │   │   ├── footer.etlua
│   │   │   ├── navbar.etlua
│   │   │   ├── navigation.etlua
│   │   │   └── topbar.etlua
│   │   └── mixed-widget.etlua
│   └── spas # manage your js apps
│       ├── auth.html
│       ├── auth.js
│       ├── frontend.html
│       └── frontend.js
└── public # well this is public so don't put any credentials there :)
    └── assets
        ├── css
        ├── js
        ├── media
        

within your favorite editor you can now add layouts, partials, pages, spas, apis & components.

You can also add your media files in the public folder.

Once your website works properly on your computer, you can deploy on your server using the tools you want. (a simple bash file or using ruby mina by exemple)

I'll preprare a video to show you how it works.


Leave a comment