Skip to content

wangxd18/extremejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

The backend of ExtremeJS works on linux. The following installing step works fine on ubuntu10.10. Apache and php are required to run examples.

1.Install v8 and nginx.

  • Download v8 source code from here.
  • Compile source code.
  • Copy libv8.so and libv8preparser.so to /usr/lib

cp libv8.so libv8preparser.so /usr/lib

2.Set ngxv8 module's config

cd extremejs/ngxv8

Use any text editor you like to open config file in the directory. Set CORE_INCS and CORE_LIBS as the v8 source code's directory. Then save and quit.

Open v8js.h,look for fopen,set fopen's arguments to "path/to/this/ngxv8/directory/init.txt".

3.Download and compile nginx。

Download nginx source code from here. Extract and then enter the source code directory. Run the following steps to config and install nginx with ngxv8 module.

./configure 
  --prefix=/home/username/local/nginx
  --add-module=/home/username/local/extremejs/ngxv8
  --with-ld-opt="-lstdc++ -ldl -lpthread"
  --sbin-path=/usr/local/sbin
  --with-cc-opt="-Wno-deprecated -fomit-frame-pointer -pthread"
  --without-http_rewrite_module
  --without-http_fastcgi_module
  --without-http_scgi_module
  --without-http_proxy_module
  --without-http_split_clients_module
  --without-http_uwsgi_module
  --without-http_gzip_module

Replace --prefix with the path you want to install nginx. Replace --add-module with the ngxv8's path in step 2. After configuration, compile and install nginx.

make
make install

When installed, copy nginx.conf to /path/to/nginx/conf.

Start nginx。

sudo /usr/local/sbin/nginx;

4.Run examples.

Enter apache's htdocs:

cd /path/to/your/apache/htdocs;

Replace /path/to/your/apache/ with your apache path.

Set symbolic link to extremejs/migrator or copy it.

ln -s /path/to/your/extremejs/migrator

Enter migrator directory,open migrator.js.

Look up for domain : '192.168.1.239',replace the ip location with your server domain or ip.

5. Start apache and run examples.

Visit http://yourdomain/migrator/examples/gobang/gobangc.html and http://yourdomain/migrator/examples/gobang/gobang.html.

Replace yourdomain with your server domain or ip. gobang.html is gobang game with extremejs working. gobangc.html is the local version.

Click start to play gobang game. Enjoy it!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages