Skip to content

Bearbobs/ssvm-nodejs-starter

 
 

Repository files navigation

Sentiment Analyzer Backend using SSVM

It is an implimentation of sentiment analyzer using ssvm. It is inspired from Sentimental which is in javascript. Main advantage here is that the actual logic is based on rust which is faster and the api is exposed with express which makes it simple to impliment.

Example Usage:

/GET http://127.0.0.1:3000/?phrase="I am happy" //Score: 3, Comparative: 1

TODO:

  • Senitiment Analyzer logic.
  • File analysis:
    • API
    • Rust logic(Facing issue with Rexiv2 with SSVM)
  • Make logic of Analyzer more refined.
  • Frontend to wrap it.

Getting started with SSVM

Build and test

Fork this project to create your own Rust functions in Node.js. Learn more

  • The Rust functions are in the src directory. You can put high performance workload into Rust functions.
  • The JavaScript functions are in the node directory and they can access the Rust functions.
  • Use the node node/app.js command to run the application in Node.js.

Use Docker to build and run

$ docker pull secondstate/ssvm-nodejs-starter:v1
$ docker run -p 3000:3000 --rm -it -v $(pwd):/app secondstate/ssvm-nodejs-starter:v1
(docker) # cd /app
(docker) # ssvmup build
(docker) # node node/app.js

From a second terminal window, you can test the local server.

$ curl http://localhost:3000/?name=SSVM
hello SSVM

Read more:

Resources

Brought to you by the Open source dev team at Second State. Follow us on Twitter, Facebook, LinkedIn, YouTube, or Medium

About

A template project to run Rust functions in Node.js through the Second State WebAssembly engine.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 43.0%
  • JavaScript 36.0%
  • Dockerfile 21.0%