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

https://github.com/marrow16/nasapi

A Javascript (RESTful) webservices container using Nashorn
https://github.com/marrow16/nasapi

java javascript nashorn rest-api spring-boot

Last synced: 2 months ago
JSON representation

A Javascript (RESTful) webservices container using Nashorn

Awesome Lists containing this project

README

          

# NasApi

##### Proof of Concept / Prototype

A Javascript (RESTful) webservices container using Nashorn - incorporating ```require``` capabilities (using [nashorn-commonjs-modules](https://github.com/coveo/nashorn-commonjs-modules)).

Uses:-
* SpringBoot
* Embedded Jetty server
* Nashorn
* MongoDb

Use Maven to build (produces full fat jar)

To run server:-

In path where Javascript sources exist (uses ```index.js``` in current path):-
```
java -jar [path-to-jar]/Nasapi-0.1.jar
```

To specify a path to load Javascript sources (looks for ```index.js``` in specified path):-
```
java -jar Nasapi-0.1.jar myServers/test
```

To specify a specific start-up root Javascript file:-
```
java -jar Nasapi-0.1.jar myServers/test/main.js
```



Working example - see [ServerTest](./serverTest/index.js)