-
Notifications
You must be signed in to change notification settings - Fork 4
Getting started
- Pre-installation
- Installation
- Creating a new project
- Running the application
- Full documentation for the CLI
- Keep reading
-
Make sure you have Node installed by using the command
node -v
. The minimum node version compatible with this lib is 13.2. If Node is not installed or is on an unsupported version, consider installing nvm in your machine. nvm is a tool to manage node versions installed in the system, it's easier to upgrade and switch from one version to another than a pure installation of node. To install nvm, check this link. If you don't want to install nvm, you can also download node from here. -
This is optional, but we recommend using yarn instead of npm. If you choose to follow this recommendation, use the command
npm install yarn --global
.
In order to make it easier and faster to start up a project with Beagle Backend TS, you should install our CLI tool globally:
yarn global add @zup-it/beagle-backend-cli
Using the CLI, run the command new
with the name of your project:
beagle-ts new [PROJECT NAME]
This command will create the following project structure:
π¦ project-name
β£ π src
β β£ π screens
β β β£ π home.tsx // example of navigation between screens
β β β£ π index.ts // file where the routes are defined
β β β π welcome.tsx // example for default page
β β£ π config.ts // file that have methods to get the BeagleTsConfig
β β£ π global-context.ts // declaration of GlobalContext and example for its usage
β β π index.ts // root of the express app, where everything is set up
β£ π .editorconfig
β£ π .eslintrc.js
β£ π LICENSE
β£ π README.md
β£ π beagle-ts.json // configuration file to be used by the CLI and the Express App
β£ π package-lock.json
β£ π package.json
β π tsconfig.json
cd [PROJECT NAME]
yarn start
The application will be running at http://localhost:3000
if you didn't change any of the default configurations.
This command also starts a websocket server that enables hot-reloading in front-end applications. To know more
about this, read this topic.
Read the topic Advanced topics: CLI to know more about every command and options of the CLI.
Next topic: Creating your first screen