Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Jazys/nuag.e-lib
Package for nuag.e provider to create VPS
https://github.com/Jazys/nuag.e-lib
Last synced: 4 days ago
JSON representation
Package for nuag.e provider to create VPS
- Host: GitHub
- URL: https://github.com/Jazys/nuag.e-lib
- Owner: Jazys
- Created: 2021-11-23T06:51:21.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2021-12-12T00:16:34.000Z (almost 3 years ago)
- Last Synced: 2024-08-01T20:50:04.806Z (3 months ago)
- Language: TypeScript
- Size: 7.81 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Lib for nuag.e provider
It's a simple lib in Typescript for dealing with nuag.e provider ( VPS)----------------
TODO :
* set Authentification
* create a server
* get information of server
* start/stop a server
* delete a server----------------
# using require
```javascript
const { getWorkspaceNuage, createServer, getIpServer, CORE, RAM, DISK } = require('nuage-lib');
```How to use lib :
Using promise to connect to your workspace
```javascript//return a boolean
getWorkspaceNuage({
account_name, // user to login
account_pass, // user's password
account_org // name of your organization
}).then((res) => if(res) console.log("ok"));
``````javascript
//return the id of new server
createServer({
projectName, // name of your workspace to create server
ram, // use enum RAM
core, // use enum CORE
diskSize, // use enum DISK
osName, // use enum OS_NAME
description, // description of your server
name, // name of your server
enablePublicIP, // by default yes, attach a pulic IP
allowSSH, // by default yes, open SSH port
allowHTTP, // by default yes, open 80/443 ports}).then((res) => console.log("res"));
```Using promise to get public IP of one server
```javascript//return the public ip of your server
getWorkspaceNuage({
project_name, // the name of your workspace
serverid // id of the server
}).then((ip) => console.log(ip));
```