Spring but JS
Use annotations and Spring Inversion of Control in NodeJS! Easily set up a REST endpoint like you would in a Spring Boot application.
Not actually affiliated with Spring.
Install
npm install spring-but-js --save
A demonstration
Below is a small project that makes use of SpringButJs, showcasing simple IoC and Web MVC mechanics to set up a web service.
main.js
const SpringButJs = ;SpringButJs;
components/my-service.js
'@Service'{this {return 'Hello from MyService!';}}
components/my-controller.js
'@RestController''@RequestMapping("/hello")'{let myService;'@Autowired'this {myService = _myService;}'@RequestMapping("/")'this {res;}}
GET http://localhost/hello => 200: 'Hello from MyService!'
Documentation
View the GitHub Wiki for more documentation!