Skip to content

Commit

Permalink
Updated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
mayurvir committed Mar 24, 2024
1 parent 59fc7d6 commit 1111c4d
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 2 deletions.
69 changes: 68 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,68 @@
# beckn-action-bot
# beckn-action-bot
This is an open source project that creates an action bot which can take plain text inputs and take beckn based actions based on them.


## Instructions

1. The script runs both in local environment as well as docker containers. Its recommended to use docker containers for local development as well as testing
2. Test Driven Approach should be used for development. Write the test case first then write the code.

## Steps to setup

1. Copy `.env.sample` to `.env` and set your environment variables
2. To run the node server, run:

```
npm run dev # for debugging
npm run docker:dev # for docker
```

## Steps to run tests

To run test cases, run:

```
npm run test # run all test cases
npm run test:unit # to run unit tests
# To run test cases inside docker-container
npm run docker:test
```

## Steps to run lint tests

We use eslint to check for linting errors. The rules for eslint are configured under `.eslint.json` file. Use the following command to run the eslint tests:

```
npm run lint
```

## Steps to prettify

We use prettier to prettify the code. Run the following command to prettify:

```
npm run prettify
```

If you want to change the prettier rules, edit the `.prettierrc.json` file

## Steps to deploy

```
# build
docker-compose build
# Biuld on mac m1
DOCKER_DEFAULT_PLATFORM=linux/amd64 docker-compose build
docker-compose push
```

On the server

```
docker-compose pull
docker-compose up -d
```
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"scripts": {
"test": "NODE_ENV=test mocha tests --recursive --timeout 900000 -r dotenv/config --exit",
"test:unit": "NODE_ENV=test mocha tests/unit --recursive --timeout 0 -r dotenv/config --exit",
"test:performance": "NODE_ENV=test mocha tests/performance --recursive --timeout 0 -r dotenv/config --exit",
"test:apis": "NODE_ENV=test mocha tests/apis --recursive --timeout 0 -r dotenv/config --exit",
"start": "nodemon server.js",
"dev": "NODE_ENV=dev && npm start",
Expand Down

0 comments on commit 1111c4d

Please sign in to comment.