Skip to content

Conversation

@RadekM86
Copy link

@RadekM86 RadekM86 commented Feb 3, 2018

No description provided.

Copy link
Contributor

@Ami777 Ami777 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eleganckie rozwiązanie


app.get('/:number1/:number2', (req, res) => {
const number1 = req.params.number1;
const number2 = req.params.number2;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Można by ew. już przy deklaracji zmiennych dać parseInt.

const express = require('express');
const app = express();

var name =""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Używamy raczej let.

app.use(express.static('./public/zadanieDnia/'));

app.get(`/vote/:selected`, (req, res) => { //np. localhost:3000/hello/Programist(k)o
const vote = req.params.selected;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bardzo eleganckie rozwiązanie

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants