Giter Club home page Giter Club logo

de.flapdoodle.embed.nodejs's Introduction

Organisation Flapdoodle OSS

We are now a github organisation. You are invited to participate.

Embedded node.js

Embedded node.js will provide a platform neutral way for running node binary in unittests.

Why?

  • its easy, much easier as installing right version by hand
  • you can change version per test

Howto

Maven

Stable (Maven Central Repository, Released: 06.10.2013 - wait 24hrs for maven central)

<dependency>
	<groupId>de.flapdoodle.embed</groupId>
	<artifactId>de.flapdoodle.embed.nodejs</artifactId>
	<version>1.28</version>
</dependency>

Snapshots (Repository http://oss.sonatype.org/content/repositories/snapshots)

<dependency>
	<groupId>de.flapdoodle.embed</groupId>
	<artifactId>de.flapdoodle.embed.nodejs</artifactId>
	<version>1.29-SNAPSHOT</version>
</dependency>

Changelog

Initial Version starts with 1.19 SNAPSHOT as extract from Embedded MongoDB Project

1.28 (SNAPSHOT)

1.28 (SNAPSHOT)

  • process dep update
  • support for node.js v 0.10.20

1.27

  • api change upgrade (de.flapdoodle.embed.process api change)
  • added support for nodejs 0.10.0

1.26

  • dep version change

1.25

  • dep version change

1.24

  • dep version change

1.23

  • added v0.8.8, v0.9.1 (Unstable)

1.22

1.21

  • maven version range disabled

1.20

  • more customization, minor bugfixes

1.19

  • initial cut out

1.18

Supported Versions

Versions: 0.8.6, any custom Support for Linux, Windows and MacOSX.

Usage

Running javascript from junit test with node.js

public void testNodejs() throws IOException, InterruptedException {
	final File helloWorld = Files.createTempFile("node-hello-world.js");
	Files.write("console.log(\"Running Hello World inside NodeJS in \"+process.cwd());setTimeout(function(){},1000);", helloWorld);
	try {
		Nodejs.call(NodejsVersion.Main.V0_8, helloWorld.getAbsolutePath(), System.getProperty("java.io.tmpdir"));
	} finally {
		Files.forceDelete(helloWorld);
	}
}

de.flapdoodle.embed.nodejs's People

Contributors

michaelmosmann avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

isabella232

de.flapdoodle.embed.nodejs's Issues

SyntaxError: Use of const in strict mode. - NodeJS version update necessary

NodeJS modules, that use "const" won't work anymore. Previously working modules are failing after dependency updates, with the following error:
[nodejs error] SyntaxError: Use of const in strict mode.
Providing a more up to date nodejs version would solve this issue, according to: https://stackoverflow.com/questions/22603078/syntaxerror-use-of-const-in-strict-mode (answer by: Alexander). Is it alternatively possible to provide the --harmony-flag to the Flapdoodle Embedded Node.js?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.