learncodeacademy / node-tutorials Goto Github PK
View Code? Open in Web Editor NEWNode.js tutorials that accompany the Node.js video course
Home Page: http://store.learncode.academy/
Node.js tutorials that accompany the Node.js video course
Home Page: http://store.learncode.academy/
Hi Will,
First of all thanks for all the great Tutorial and everything really.
Quick question about the destructive id assignment in users.js
.get("/:id", (req, res) => {
const { id } = req.params;
const user = users.find(user => user.id == id);
if (user) {
res.send(user);
} else {
res.status(404).send(`User ${id} does not exist`);
}
})
I'm using nodejs version 4.5 , but somehow when trying to use the node command here I always end up with an error message. Do you maybe know why?
const { id } = req.params; ^
SyntaxError: Unexpected token {
I have tried this a few times, but for video 28, the last thing that is done is to change the /etc/ssh/sshd_config file. When I do this the way you've explained in the video and on this repo, I can't get into my root@<ip_name>. The prompt says "Permission denied (publickey)". I've tried it twice doing exactly what is demonstrated, but the same thing each time. What should I do?
When I run pm2 deploy production setup I get this in return
--> Deploying to production environment
--> on host 67.205.178.187
○ hook pre-setup
[email protected]'s password:
mkdir: cannot create directory ‘/Users’: Permission denied
mkdir: cannot create directory ‘/Users’: Permission denied
mkdir: cannot create directory ‘/Users’: Permission denied
setup paths failed
Deploy failed
Why does this happen?
During 14-dynamic-views your tweets have a user id attached to them but I didnt see that step in the previous videos.
I'm following your example, but I get this when I enter pm2 startup ubuntu on the deploy
[PM2] You have to run this command as root. Execute the following command:
sudo env PATH=$PATH:/home/deploy/.nvm/versions/node/v8.1.4/bin /home/deploy/.nvm/versions/node/v8.1.4/lib/node_modules/pm2/bin/pm2 startup ubuntu -u deploy --hp /home/deploy
When I enter the sudo path just given it asks for my password and it returns this:
deploy is not in the sudoers file. This incident will be reported.
What am I doing wrong?
The ".sh" files that are in the video are not included in this repository. I know we are not suppose to run those files, but it would be easier to have a quick look, rather than to go trough a video again.
I'm following the instructions for using pm2 and when I enter pm2 startup ubuntu, I get this:
[PM2] You have to run this command as root. Execute the following command:
sudo env PATH=$PATH:/home/deploy/.nvm/versions/node/v8.1.4/bin /home/deploy/.nvm/versions/node/v8.1.4/lib/node_modules/pm2/bin/pm2 startup ubuntu -u deploy --hp /home/deploy
deploy@ubuntu-512mb-nyc1-01:~$ sudo env PATH=$PATH:/home/deploy/.nvm/versions/node/v8.1.4/bin /home/deploy/.nvm/versions/node/v8.1.4/lib/node_modules/pm2/bin/pm2 startup ubuntu -u deploy --hp /home/deploy
[sudo] password for deploy:
deploy is not in the sudoers file. This incident will be reported.
What should I do?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.