LeChris
John 15:18
Background
Retaliation was a project which originated from the lack of releases towards the roleplay scene. Various developers were taking keen abuse to this, and profiting by selling older and less stable rev edits to make a quick buck. This led me to create a new project to revolutionize and change the role-playing scene as we know it.
Retaliation 3.0
Previous version were built upon Laravel, which is a PHP framework, but is quite bulky and many users had difficult times adjusting to Laravel. To make up for the mistakes within the last two versions, I now introduce you to the third version of Retaliation.
Numerous changes have occurred since you last seen this project in action, the primary being the switch of languages to Node. Not only does this give a faster overall speed, but it's more reliable in the sense installation is easier, upkeep, and many other things. We use various modules to ensure complete reliability ranging from Express as a HTTP server to the usage of MYSQL pools for reliability.
Updates (June 28, 2016)
Angular has officially been added
Socket has officially been added
A command system has officially been added into the console
Future Plans
A UI may be created for our console
Screenshots
Code Snippets
app/http/user/retrieve.js
Code:
module.exports = function(app) {
routes = routes + 1;
app.get('/api/users/request/:who/:token', function(req, res)
{
if (req.params.token == 'jaden-was-molested-by-his-dad-and-josh-rear-ended-him')
{
pool.getConnection(function(err, connection)
{
if (err) console.log(' [Error] Database connection failed');
connection.query('SELECT id, username, motto, look, credits, activity_points FROM users WHERE username = ? LIMIT 1', [req.params.who], function(err, result)
{
if (err) console.log(' [Error] Failed to retrieve cms_settings');
res.setHeader('Content-Type', 'application/json');
res.send(JSON.stringify(result[0]));
});
connection.release();
});
} else {
res.send('Authorization denied');
}
});
}
Completed Code :
LINK REMOVED
Last edited by a moderator: