Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
@edunse/deployer
Advanced tools
Readme
It mainly used by myself to deploy express.js servers or Angular 2+ projects (Angular Universal as well), but you can use it for a lot of things. This repo allows you to deploy files on server, remove old files (e.g. old angular hashed bundles, which you don't need after deploying new ones), restart a server (e.g. Angular Universal server) by running command line commands and other cool stuff.
Just install this module globally:
npm install -g @edunse/deployer
To make a config process easier, there is a command to initialize an environment on first setup:
cd /home/myproject # first navigate to your project folder
deployer init # then run the initialization
What it makes:
Right after the initialization your config files will be located in the root directory. You should change their content to your own purposes.
module.exports = [
// list of tasks, they will be running in the presented order one after another
// there are 3 types of tasks available: upload, delete, run
{
name: 'upload',
src: [
'./dist/**/*',
'!./dist/templates/**',
],
dest: '/home/public'
},
{
name: 'delete', // remove files on the server
src: [
'/home/public/*.js', // in the remote folder
],
// optional, check which files to delete
test: (file) => {
return Date.now() - file.modifyTime > 24 * 3600 * 1000;
}
},
{
name: 'run', // run commands
commands: [
'cd /home/public',
'pm2 restart server'
],
}
];
module.exports = {
host: 'XXX.XXX.XXX.XXX', // host ip or domain
username: 'root',
password: 'root_password',
}
To execute tasks from a config file run the command:
deployer deploy
FAQs
Let's make deployment great again
We found that @edunse/deployer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.