-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Saya edited this page Jan 30, 2020
·
1 revision
The ShipGirl Project. Saratoga. (c) Azurlane for Saratoga.
Saratoga
is an open source library that stores, fetches, updates, and outputs Shipgirl related data from Azur Lane.
Inspired by AzurApi-JS;
Saratoga
aims to give you most of the functionality + ability to hot reload your data without restarting your service.
This homepage will contain the most basic way of using this library.
const { createServer } = require('http');
const { Saratoga } = require('saratoga');
const client = new Saratoga();
const onRequest = (req, res) => {
if (!client.ready) {
res.write('Saratoga is not yet ready!');
} else {
res.write(client.ships.getByEnglishName('Saratoga'));
}
res.end();
};
createServer(onRequest)
.listen(8080);
const { createServer } = require('http');
const { Saratoga } = require('saratoga');
const client = new Saratoga();
const onRequest = (req, res) => {
if (!client.ready) {
res.write('Saratoga is not yet ready!');
} else {
res.write(client.equipments.getByEnglishName('四联装130mm副炮Mle1932'));
}
res.end();
};
createServer(onRequest)
.listen(8080);