2019-10-12 09:14:56 +02:00
|
|
|
# Getting Started with Budibase
|
|
|
|
|
|
|
|
(For contributors - scroll down)
|
2019-10-12 09:02:56 +02:00
|
|
|
|
2020-01-23 11:52:42 +01:00
|
|
|
### 1. Global install budibase
|
2019-10-12 09:02:56 +02:00
|
|
|
|
|
|
|
`npm install -g budibase`
|
|
|
|
|
2020-01-23 11:52:42 +01:00
|
|
|
### 2. Start using Budibase
|
2019-10-12 09:02:56 +02:00
|
|
|
|
|
|
|
Create a directory to store your Budibase apps
|
|
|
|
|
|
|
|
`mkdir my-budibase`
|
|
|
|
|
|
|
|
`cd my-budibase`
|
|
|
|
|
|
|
|
Initialise Budibase in current directory
|
|
|
|
|
|
|
|
`budi init`
|
|
|
|
|
|
|
|
Create a new Budibase app
|
|
|
|
|
|
|
|
`budi new my-app`
|
|
|
|
|
|
|
|
Run Budibase
|
|
|
|
|
|
|
|
`budi`
|
|
|
|
|
|
|
|
You can now access the Budibase builder on http://localhost:4001/_builder
|
|
|
|
|
|
|
|
Start building!
|
|
|
|
|
|
|
|
Once you have created your app, you need to create yourself an instance of your app (i.e. a database)
|
|
|
|
|
|
|
|
`budi instance my-app`
|
|
|
|
|
2019-09-10 07:01:26 +02:00
|
|
|
## Getting Started for Contributors
|
2019-09-09 22:02:23 +02:00
|
|
|
|
2019-09-10 07:01:26 +02:00
|
|
|
### 1. Prerequisites
|
2019-09-09 22:02:23 +02:00
|
|
|
|
2019-09-10 07:01:26 +02:00
|
|
|
*yarn -* `npm install -g yarn`
|
2019-09-09 22:02:23 +02:00
|
|
|
|
2019-09-10 07:01:26 +02:00
|
|
|
*jest* - `npm install -g jest`
|
2019-09-09 22:02:23 +02:00
|
|
|
|
2019-09-10 11:38:13 +02:00
|
|
|
### 2. Clone this repository
|
|
|
|
|
2019-11-13 23:01:13 +01:00
|
|
|
`git clone https://github.com/Budibase/budibase.git`
|
2019-09-10 11:38:13 +02:00
|
|
|
|
|
|
|
then `cd ` into your local copy...
|
|
|
|
|
|
|
|
### 3. Install and Build
|
2019-09-09 22:02:23 +02:00
|
|
|
|
2020-01-29 10:11:33 +01:00
|
|
|
`yarn` to install project dependencies
|
2019-09-10 07:01:26 +02:00
|
|
|
|
2020-01-29 10:11:33 +01:00
|
|
|
`yarn bootstrap` will install all budibase modules
|
|
|
|
|
|
|
|
`yarn build` will build all budibase packages
|
2019-09-10 07:01:26 +02:00
|
|
|
|
2020-01-22 14:50:39 +01:00
|
|
|
`yarn initialise` will initialise your budibase (i.e. create local database)
|
2019-09-09 22:02:23 +02:00
|
|
|
|
2019-09-23 01:00:48 +02:00
|
|
|
### 4. Running
|
2019-09-09 22:02:23 +02:00
|
|
|
|
2019-11-23 08:28:24 +01:00
|
|
|
A Budibase apps folder will have been created in `packages/server/myapps`. This is a blank apps folder, so you will need to create yourself an app:
|
|
|
|
|
|
|
|
```
|
|
|
|
cd packages/server
|
2020-01-24 17:31:53 +01:00
|
|
|
yarn run budi new your-app-name
|
2019-11-23 08:28:24 +01:00
|
|
|
```
|
|
|
|
|
2020-02-22 23:27:41 +01:00
|
|
|
now build and publish the latest budibase libs, to your new app
|
|
|
|
|
|
|
|
```
|
|
|
|
# from root of repo
|
|
|
|
yarn run publishdev
|
|
|
|
```
|
|
|
|
|
2019-11-23 08:28:24 +01:00
|
|
|
then
|
|
|
|
|
2020-03-07 10:55:10 +01:00
|
|
|
...
|
|
|
|
cd packages/server
|
2019-11-23 08:28:24 +01:00
|
|
|
`yarn run budi` and to run the budibase server
|
2020-03-07 10:55:10 +01:00
|
|
|
...
|
2019-11-23 08:28:24 +01:00
|
|
|
|
|
|
|
if you then want to run the builder in dev mode (i.e. with hot reloading):
|
|
|
|
|
|
|
|
... keep the server running, and..
|
|
|
|
1. Open a new console
|
2020-01-28 10:11:08 +01:00
|
|
|
2. `yarn dev`
|
|
|
|
3. Access the builder on http://localhost:3000
|
|
|
|
|
2020-03-07 10:55:10 +01:00
|
|
|
...
|
|
|
|
If you get an error:
|
|
|
|
lerna ERR! yarn run dev:builder exited 1 in '@budibase/server'
|
|
|
|
run lsof -ti :4001 | xargs kill
|
|
|
|
...
|
|
|
|
|
2020-01-28 10:11:08 +01:00
|
|
|
This will enable watch mode for both the client AND the server.
|
|
|
|
|
|
|
|
### Running Commands from /server Directory
|
2019-11-23 08:28:24 +01:00
|
|
|
|
|
|
|
Notice that when inside `packages/server`, you can use any Budibase CLI command via yarn:
|
|
|
|
|
2020-01-24 17:31:53 +01:00
|
|
|
e.g. `yarn budi new mikes_app` == `budi new mikes_app`
|
2019-11-23 08:28:24 +01:00
|
|
|
|
|
|
|
This will use the CLI directly from `packages/cli`, rather than your globally installed `budi`
|
2019-09-09 22:02:23 +02:00
|
|
|
|
|
|
|
## Documentation
|
|
|
|
|
2019-09-10 11:38:13 +02:00
|
|
|
A work in progress, lives here: https://docs.budibase.com
|
2019-09-09 22:02:23 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|