Bit with NodeJS
Create a new Node workspace:
$bit new basic my-hello-world
Copied
Alternatively, start from our NodeJS starter for stitching a micro-service architecture.
Create app
You can create a NodeJS app using our basic NodeJS app type. To create a NodeJS app run the following command:
$bit create node-app my-app
Copied
You can find more information about building apps in the NodeJS app sections.
Create backend services
Create backend services with HMR using our NodeJS server app types. To create a GraphQL server run the following command:
$bit create graphql-server my-server
Copied
You can find more information on creating Express, NodeJS and GraphQL at the backend services docs section.
Create platforms
Platforms are used to stitch backend services into a unified platform. Run the following command to create a service-oriented platform:
$bit create platform my-platform
Copied
Learn more about using Platforms at the Platform docs section.
Create module
Create a NodeJS module by running the following commands:
$bit create module twitter
Copied
You can find more information on creating modules at the NodeJS Modules docs section.
Create entity
Entities are used to define data structures and their behaviour and reuse them in your backends and frontends:
$bit create entity user
Copied
Learn more on creating entities on the Entities docs section.
Release components
You can release your components by running the following commands:
$bit tag --message initial release
Copied
Sync the changes with your remote server:
$bit export
Copied
In case you are looking to build with your own CI, automate these commands from a CI yourself or use our scripts for automating the process.