steedos-platform/CONTRIBUTING.md

65 lines
3.2 KiB
Markdown
Raw Normal View History

2020-12-24 07:14:55 +00:00
# CONTRIBUTING GUIDE
2022-02-28 08:45:29 +00:00
## Development Environment
2020-12-28 02:08:19 +00:00
2022-02-28 08:45:29 +00:00
We recommend using Gitpod for online development, which eliminates the tedious process of setting up a development environment.
2020-12-28 02:08:19 +00:00
2022-02-28 08:45:29 +00:00
If you need to deploy the development environment locally, you can refer to the following Gitpod configuration files, which describe the specific process:
- [.gitpod.Dockerfile](.gitpod.Dockerfile)
- [.gitpod.yml](.gitpod.yml)
> `gitpod-workspace-base:2.1` is the docker of steedos template project, see it's [.gitpod.Dockerfile](https://github.com/steedos/steedos-project-template/blob/master/.gitpod.Dockerfile) for more.
## Requirements
2020-12-28 01:58:57 +00:00
2022-01-14 14:51:23 +00:00
- [MongoDB](https://www.mongodb.com/try/download/) version = 4.2.17. MongoDB is a general purpose, document-based, distributed database built for modern application developers.
- [Redis](https://redis.io/) version = 6.2.6.
- [Node.js](https://nodejs.org/en/download/) version = 12.22.7 (which can be checked by running `node -v`). You can use [nvm](https://github.com/nvm-sh/nvm) for managing multiple Node versions on a single machine installed.
- [Yarn](https://yarnpkg.com/en/) version = 1.22.17 (which can be checked by running `yarn version`). Yarn is a performant package manager for JavaScript and replaces the `npm` client. It is not strictly necessary but highly encouraged.
2022-02-28 08:45:29 +00:00
- [Meteor](https://www.meteor.com/) version = 1.9.3. Meteor is an open source platform for web, mobile, and desktop used by over half a million developers around the globe to make shipping javascript applications simple, efficient, and scalable.
> Only when you run the source code in '/creator' folder of our platform, you need to install Meteor. If you use Steedos as a development tool, you do not need to install Meteor.
2020-12-28 01:58:57 +00:00
## Prepare For Development
2019-09-14 12:29:26 +00:00
- Clone this repository to your local.
- Enter to the local folder of this repository by command line.
- Run `yarn` on command line to install the dependent NPM packages.
2022-01-22 14:28:21 +00:00
- Then run `yarn bootstrap` to auto link the npm packages that mentioned in the file `lerna.json` by [lerna](https://lerna.js.org/).
2022-01-14 14:51:23 +00:00
- Then run `yarn build` to auto build all NPM packages in the folder "packages" and "services" of the source code.
- Start the MongoDB service.
2021-04-08 09:14:17 +00:00
## Run Project
2022-01-14 09:47:23 +00:00
2023-09-19 06:42:48 +00:00
- Run `yarn start` on the command line to start
2019-09-14 12:29:26 +00:00
2022-01-22 14:28:21 +00:00
- Use your browser to access `http://localhost:5000`.
## Run The Source Code Of Meteor Bundle
The code in the folder '/creator' of this repository is the souce code of a Meteor application. And all of it's code will build to the '/server' folder as a NPM package named 'steedos-server'.
The code in '/packages' is our souce code of some core NPM packages on which the Meteor application above based on.
2022-01-22 14:28:21 +00:00
If you only need to debug the source code in the '/packages', you shoud just [Run Project](#run-project).
You will need to read the tutorial bellow only when you need to debug the source code of Meteor application in the '/creator' folder.
### Environment variable
You should add a `.env.local` file to the '/creator' folder, and add some content as as the web service url and mongo server url like this:
2019-09-14 12:29:26 +00:00
```shell
ROOT_URL=http://127.0.0.1:3100
MONGO_URL=mongodb://127.0.0.1/steedos
```
2023-06-13 01:01:40 +00:00
### Use local Node.js to debug platform source code
2019-09-14 12:29:26 +00:00
2023-06-13 00:58:49 +00:00
```bash
yarn
yarn build
yarn start
2019-09-05 09:06:57 +00:00
```