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
- Host: GitHub
- URL: https://github.com/marrow16/nasapi
- Owner: marrow16
- License: apache-2.0
- Created: 2017-06-27T19:09:30.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-07-12T14:02:05.000Z (almost 9 years ago)
- Last Synced: 2025-06-13T18:49:03.591Z (about 1 year ago)
- Topics: java, javascript, nashorn, rest-api, spring-boot
- Language: Java
- Homepage:
- Size: 70.3 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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)