Get Started
In this section of the QuickStart guide, you'll learn how to start working on your decentralized application.
In order to develop and build "My Dapp," the following pre-requisites must be installed:
- For Flow only:
- Flow CLI (after installation run
flow cadence install-vscode-extension
to enable code highlighting for Cadence files)
- For Solana only:
Using a terminal (or command prompt), change to the folder containing the project files and type:
yarn
. This will fetch all required dependencies. The process will take 1-3 minutes and while it’s in progress, you can move on to the next step.You might see failures related to the
node-gyp
package when Yarn installs dependencies. These failures occur because the node-gyp package requires certain additional build tools to be installed on your computer. Follow the instructions for adding build tools and then try running yarn
again.Using a terminal (or command prompt), change to the folder containing the project files and type:
yarn start
This will run all the dev scripts in each project package.json.This section contains installation guides for common dev environments.
(Source: Solana) We suggest that you install Rust using the 'rustup' tool. Rustup will install the latest version of Rust, Cargo, and the other binaries.
For Mac users, Homebrew is also an option. The Mac Homebrew command is
brew install rustup
and then rustup-init
. See Mac Setup & Installing Rust for more details.After installation, you should have
rustc
, cargo
, & rustup
. You should also have ~/.cargo/bin
in your PATH environment variable.If you prefer to run scripts individually, the order is:
lerna run deploy [email protected]/dappstarter-dapplib --stream
to compile contracts/*.sol files, deploy them to the blockchain.Run the dapp in a separate terminal. You must have run npm run deploy for the dapp to see the most recent smart contract changes.
lerna run dev [email protected]/dappstarter-client --stream
runs the dapp on http://localhost:5001 using webpack dev serverRun the server in a separate terminal. You must have run npm run deploy for the dapp to see the most recent smart contract changes.
lerna run dev [email protected]/dappstarter-server --stream
runs NodeJS server app on port 5002 with NestJStest-config.js contains settings used by test scripts
Run tests using
lerna run test [test file] [email protected]/dappstarter-dapplib --stream
DappStarter currently does not provide blockchain migration scripts to be used in production. However, here are the scripts for generating production builds:
lerna run build:prod
generates dapp bundle for production.\Last modified 1yr ago