# Өөрийн сервэр дээр service асаах

Прожект: <https://github.com/teo-mn/Verify4js-microservice>\
\
**Node JS прожект асаах:**

```sh
export NODE_URL=https://node.teo.mn && node index.js
```

**Docker-оор асаах:**

```sh
# image татах
docker pull corexchain/verify4js-microservice
# image ажиллуулах
docker run -it -p 3000:3000 -e NODE_URL=https://node.teo.mn {{CONTAINER_ID}}
```

**Ашиглахдаа:**

```powershell
curl --location --request POST 'localhost:3000/upload' --form 'file=@"/home/user/Documents/test.pdf"'
```

**Үр дүн**

Дараах хэлбэртэй байна.

```typescript
interface VerifyResultInterface { 
  state: 'REVOKED' | 'EXPIRED' | 'ISSUED' | 'APPROVE_PENDING' | 'INVALID',
  metadata: MetaDataInterface, 
  cert: {}, 
  issuer: {isActive?: boolean}, 
  isTestnet: boolean, 
  isUniversity?: boolean 
}
```

**state нь**

* ISSUED бол баталгаажсан файл.
* REVOKED бол хүчингүй болгосон файл
* EXPIRED бол хугацаа нь дууссан файл,
* APPROVE\_PENDING бол их сургуулийн диплом БЕГ баталгаажуулахыг хүлээж буй
* INVALID бол баталгаажаагүй файл.

**metadata нь**

файлд нэмэлтээр бичсэн утгууд.

**cert нь**

блокчэйн дээр бичигдсэн мэдээлэл.

**issuer нь**

баталгаажуулагчийн мэдээлэл.

**isTestnet нь**

тест сүлжээнд баталгаажуулсан бол true байна.

**isUniversity нь**

их сургуулийн диплом үед true байна.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.certify.mn/notly/verify-document/deploy-on-premise.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
