Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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));
```