Overview
Deskree’s Atomic platform provides a seamless way to deploy your Nanoservice-TS applications to the cloud without worrying about infrastructure management. This guide will walk you through the process of deploying your Nanoservice-TS project to Deskree Serverless.
Prerequisites
Before you begin, make sure you have:
- A Nanoservice-TS project ready for deployment
- Node.js (v18 or later) and npm installed
- The Nanoservice-TS CLI installed (
npx nanoctl@latest
)
Step 1: Sign Up for Deskree Atomic
- Visit https://atomic.deskree.com and create an account.
- After signing up, you’ll need to create an access token for CLI authentication.
Step 2: Create an Access Token
-
From the Atomic dashboard, click on the Account Settings icon in the bottom-left corner.
-
Click on Access Token.
-
Click on Create new token.
-
Fill in the token details:
- Token name: Enter a descriptive name (e.g., “Deployment Token”)
- Expiration: Select an appropriate expiration period (e.g., 7 days)
- Select scopes: Make sure to toggle both scopes:
workflow
andworkflow:execute
- Allows this token to execute a private workflowedge
andedge:deployment
- Allows this token to manage edge deployments
-
Click Generate token.
-
Copy the generated token immediately (you won’t be able to see it again).
Step 3: Authenticate with the CLI
Use the Nanoservice-TS CLI to log in with your token:
When prompted, paste your access token. You should see a confirmation message that you’ve successfully logged in.
Step 4: Deploy Your Project
Once authenticated, you can deploy your Nanoservice-TS project with a single command:
Replace YOUR_PROJECT_NAME
with a unique name for your project. This name will be used in the URL for accessing your deployed service.
The --build
flag ensures that your project is built before deployment.
Step 5: Test Your Deployment
After successful deployment, the generated URL for your service will be displayed directly in the CLI. You can also find this URL on the Atomic platform by clicking on the serverless icon in the left sidebar.
Testing with Postman
- Generate a bearer token from the Atomic platform for making authorized requests.
- Open Postman and set up a request to your endpoint.
- Add the Authorization header:
- Send the request to test your deployed service.
Accessing Specific Workflows
Each workflow in your project is accessible via its own endpoint. The endpoint path corresponds to the name of the JSON file in your workflows/json
directory.
For example, if you have a workflow defined in workflows/json/countries.json
, you can access it at the endpoint /countries
appended to your deployment URL.
Deployment Commands Reference
Here’s a quick reference of all the CLI commands used for deployment:
Login to Deskree
Deploy a Project
List Deployments
Delete a Deployment
Monitoring and Logs
Deskree’s Atomic platform provides built-in monitoring and logging for your deployed services. You can access these features from the Atomic dashboard:
- Log in to https://atomic.deskree.com
- Navigate to your project
- Click on the “Logs” tab to view execution logs
- Click on the “Metrics” tab to view performance metrics
Additional Resources
- How to Deploy Nanoservices Seamlessly with Deskree - Detailed blog post about deployment
- Deployment Video Tutorial - Step-by-step video guide for deploying to Deskree
- Nanoservice-TS Documentation - Official documentation
- Deskree Atomic Platform - Deskree’s serverless platform