Skip to content

kloentje2/fivem-webapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

fivem-webapi

How to install?

  1. Open CMD or a similar Command Line Interface
  2. Make sure that you are in the working directory, I advise you to create a new directory
  3. Excecute this install command: git clone https://github.com/kloentje2/fivem-webapi.git en press Enter (Don't leave the working directory or close the command line!)
  4. Excecute the install command: npm install
  5. Open the file app.js in your plain-text editor and change the variable key to a random string that you can remember.
  6. Don't forget the location of your fxserver/fivem.
  7. Also change the port to something you want. Be sure to open it in the firewall/router when you want to open it form outside the network
  8. Run node app.js in the Command Line and hit Enter

The console shoud show "Running on port x" (x = your chosen port)

When you are done with the steps above you can navigate to http://server-ip:port/ in your browser. On that page the commands are listed

http://server-ip:port/start
http://server-ip:port/stop
http://server-ip:port/restart

When you want to use one of these functions you need to use the API Key that you've changed.
You can use the key as a URL query

http://server-ip:port/start?key=123456
http://server-ip:port/stop?key=123456
http://server-ip:port/restart?key=123456

Without using the key you won't be able to perform the action

Requirements

  • NodeJS 8.9.4 (You can try lower, but i've tested it on this version)
  • Windows Server 2012 R2(Every recent Windows Server/Client Version should work, but i've tested it on this version)
  • Access to the Windows Firewall

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published