Install the latest artifacts automatically and launch your server in a production ready mode with accessible convars.

Related tags

CSS fivem-installer
Overview

Setup

Edit the first three lines of the index.ts file to set your custom folder layout, follow the folder structure below for a example.

const server_path: string = 'C:/fivem-server';
const cfx_data_path: string = 'cfx-server-data';
const artifacts_path: string = 'artifacts';

To install the node packages install Node.js and run the install.bat you can delete this after.

To set your environment open the start.bat file in your text editor and change environment to either development or production, the latest artifacts will only be installed if the environment is set to production

Once you have completed the above steps run the start.bat.

Folder structure

.
├── start.bat               # Run this batch script to initiate the launch sequence.
├── cfx-server-data         # Server data folder that should contain the resources, cache and server.cfg
│   └── cache               # FiveM cache folder.
├── artifacts               # FiveM artifacts folder.
└── builder                 # All files from this repository should be located in this folder.

Utilising the environment on the server

Once you have used the script to launch you're server you can use the convar environment to access the environment variable on the server.

_G.environment = GetConvar('environment', 'development')

Use cases

Stop random players from joining the wrong server and allow developers and management to join.

if _G.environment == 'development' and allowed_accounts[account_id] ~= nil then
    deferrals.done('Development server please join the live server instead.')
    return
end

Only start checks that will be used for production.

Citizen.CreateThread(function()
    if _G.environment == 'production' then
        check_time_for_shutdown()
    end
end)

Support

Feel free to make pull requests and issues i will try to respond to your requests and follows are highly appreciated :)

You might also like...

Framework-agnostic CSS-in-JS with support for server-side rendering, browser prefixing, and minimum CSS generation

Aphrodite Framework-agnostic CSS-in-JS with support for server-side rendering, browser prefixing, and minimum CSS generation. Support for colocating y

Jan 1, 2023

Octoprint-Detector2 is a detection plugin that runs in locally your browser and emails you if it detects some spaghetti, stringing or blobs on your print

Octoprint-Detector2 is a detection plugin that runs in locally your browser and emails you if it detects some spaghetti, stringing or blobs on your print

Octoprint-Detector2 is a detection plugin that runs in locally your browser and emails you if it detects some spaghetti, stringing or blobs on your print. All you need is an email account and a PC.

Jan 2, 2023

Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress 💅

Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress 💅

Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress 💅 Looking for v5? The master branch is un

Dec 31, 2022

ModeSens is your digital shopping assistant for the smart and informed.

ModeSens is your digital shopping assistant for the smart and informed.

ModeSens is your digital shopping assistant for the smart and informed. Established in 2015, ModeSens is led by a team of industry experts who developed a solution to the disconnected and crowded online shopping experience. Product information was scattered, and shopping required too much research to make an informed purchase.

Sep 22, 2022

An NPM package to help frontend developers get started with using SASS and SCSS on your project easily. The Package follows the 7-1 architecture project structure.

Project Title - Create SASS APP Ever wanted to code up a frontend project with SASS & SCSS and you are stuck with building the acclaimed 7-1 architect

Sep 22, 2022

:handbag: A beautiful CSS library to kickstart your projects

Picnic CSS Unpack your meal and get coding. An invasive CSS library to get your style started. Getting started There are many ways of using Picnic CSS

Jan 4, 2023

Increase your landing page conversion rates.

Increase your landing page conversion rates.

Ouibounce Originally created by Carl Sednaoui from MailCharts. Maintained and improved by generous contributors. Ouibounce: A small library enabling y

Dec 9, 2022

📱 Free to use static generated website template for your mobile app

📱 Free to use static generated website template for your mobile app

Mobile App Landing Page Template 📱 Free to use static generated landing page template for your mobile app 💡 Features Mobile App Landing Page Templat

Dec 30, 2022

A service to add web page screenshots to your Eleventy sites.

Screenshot API A runtime service to use live website screenshots on your site. Usage Image URLs have the formats: https://v1.screenshot.11ty.dev/:url/

Dec 24, 2022
Owner
null
A responsive HTML template for coding projects with a clean, user friendly design. Crafted with the latest web technologies, the template is suitable for landing pages and documentations.

Scribbler - a responsive HTML template for coding projects and documentations Scribbler is a responsive HTML/CSS/Javascript template designed for deve

Amie Chen 394 Jan 1, 2023
HULU Clone, View all the latest movies category wise. Built using TMDB API.

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

Hamnaikbalkhan 4 Sep 23, 2022
A pure html and css library for dark mode in your website.

Dark Mode A pure html and css library for dark mode in your website. Features It has a smooth setting and also it changes via system settings aswell.

null 1 Jan 6, 2022
The most advanced responsive front-end framework in the world. Quickly create prototypes and production code for sites that work on any kind of device.

Install | Documentation | Releases | Contributing Foundation is the most advanced responsive front-end framework in the world. Quickly go from prototy

Foundation 29.4k Jan 4, 2023
Front-end framework with a built-in dark mode and full customizability using CSS variables; great for building dashboards and tools.

This is the main branch of the repo, which contains the latest stable release. For the ongoing development, see the develop branch. Halfmoon Front-end

Tahmid (Halfmoon UI) 2.8k Dec 26, 2022
Light-switch-bootstrap - Dark mode toggle for Bootstrap 5

?? Light Switch for Bootstrap 5 Basic Bootstrap 5 custom checkbox to use night mode in your web site. Under the hood Switching to dark mode is done by

Han 35 Jan 2, 2023
Automatically generate a style guide from your stylesheets.

StyleDocco StyleDocco generates documentation and style guide documents from your stylesheets. Stylesheet comments will be parsed through Markdown and

Jacob Rask 1.1k Sep 24, 2022
Chrome extension to automatically mute/unmute Spotify tab when Advertisement starts and ends!

Ad free spotify Chrome extension to automatically mute/unmute Spotify tab when there's an Advertisement starts or ends. How to install Download Zip fi

Vivek 23 Dec 25, 2022
Automatic GatsbyJS App Landing Page - Automatically generate iOS app landing page using GatsbyJS

Automatic GatsbyJS App Landing Page Create and deploy an iOS app landing page on GitHub Pages and Netlify in a couple of minutes ?? Fork this repo ??

Imed Adel 173 Jan 1, 2023
Automatically convert those LESS file which is not using less function to CSS.

less-2-css Automatically convert those .less file which is not using less function to .css. Why Less is a powerful CSS pre-processor, but it also very

UmiJS 14 May 24, 2022